edu.ucsb.nceas.metacat.dataone

## Class NodeReplicationPolicyChecker

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

-     public class NodeReplicationPolicyChecker
      extends java.lang.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 and Description
    `NodeReplicationPolicyChecker()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and 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()` 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 Detail

    - #### NodeReplicationPolicyChecker

          public NodeReplicationPolicyChecker()

  - ### Method Detail

    - #### 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

Copyright © 2023 Regents of the University of California. All Rights Reserved.