Package edu.ucsb.nceas.metacat.dataone
Class NodeReplicationPolicyChecker
java.lang.Object
edu.ucsb.nceas.metacat.dataone.NodeReplicationPolicyChecker
This class enforces the node replication policies such as the allowed node list,
maximum size and allowed format list
- Author:
- tao
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
check
(org.dataone.service.types.v1.NodeReference sourceNode, org.dataone.service.types.v1.SystemMetadata sysmeta) Check if a given object with the system meta data and from the source node can be stored as a replicastatic void
refresh()
Refresh those properties from the metacat.peroperties file
-
Constructor Details
-
NodeReplicationPolicyChecker
public NodeReplicationPolicyChecker()
-
-
Method Details
-
check
public static boolean check(org.dataone.service.types.v1.NodeReference sourceNode, org.dataone.service.types.v1.SystemMetadata sysmeta) throws org.dataone.service.exceptions.InvalidRequest Check if a given object with the system meta data and from the source node can be stored as a replica- Parameters:
sourceNode
- the source node where the replica comes fromsysmeta
- the system meta data of the replica- Returns:
- true if the object is allowed to be stored as a replica; otherwise false.
- Throws:
org.dataone.service.exceptions.InvalidRequest
-
refresh
public static void refresh()Refresh those properties from the metacat.peroperties file
-