Class DuplicationPolicy


  • public class DuplicationPolicy
    extends Object
    A set of data showing, for a single DuraCloud account, which spaces from which providers should be duplicated to another space on another provider. This class also handles the work of loading this data set from a file stream, allowing it to be stored in a DuraCloud account and be read here.
    Author:
    Bill Branan Date: 10/18/13
    • Constructor Detail

      • DuplicationPolicy

        public DuplicationPolicy()
    • Method Detail

      • getSpacesToIgnore

        public List<String> getSpacesToIgnore()
        A list of spaces that should be ignored by the duplication task generator.
        Returns:
      • getSpaces

        public Set<String> getSpaces()
        A set of spaces which have policies associated with them.
        Returns:
      • getDuplicationStorePolicies

        public Set<DuplicationStorePolicy> getDuplicationStorePolicies​(String spaceId)
        Retrieve the duplication store policies associated with a space. If no policies are set explicitly for that space, the method returns the default store policies. An empty set is returned if any of the following conditions are true: 1) the space starts with "x-" 2) the space is not configured explicitly and there are no default store policies configured. 3) the space is defined in spacesToIgnore
        Parameters:
        spaceId -
        Returns:
      • addDuplicationStorePolicy

        public boolean addDuplicationStorePolicy​(String spaceId,
                                                 DuplicationStorePolicy dupStore)
        Adds a DuplicationStorePolicy for the specified space ID.
        Parameters:
        spaceId - the space ID to add the DuplicationStorePolicy for
        dupStore - the DuplicationStorePolicy
        Returns:
        true if added, false otherwise. False will be returned if the Set for the specified space already contains the dupStore.