Class NodeReplicationPolicyChecker

java.lang.Object
edu.ucsb.nceas.metacat.dataone.NodeReplicationPolicyChecker

public class NodeReplicationPolicyChecker extends Object
This class enforces the node replication policies such as the allowed node list, maximum size and allowed format list
Author:
tao
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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 replica
    static void
    Refresh those properties from the metacat.peroperties file

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 from
      sysmeta - 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