Class ArchiveStoreState


  • public class ArchiveStoreState
    extends Object
    This class contains a storestate, and the time, when it was last set.
    • Constructor Detail

      • ArchiveStoreState

        public ArchiveStoreState​(ReplicaStoreState storestate)
        Constructor for this class. This sets the lastchanged value to Now.
        Parameters:
        storestate - A BitArchiveStoreState
      • ArchiveStoreState

        public ArchiveStoreState​(ReplicaStoreState storestate,
                                 Date lastchanged)
        Constructor for this class.
        Parameters:
        storestate - A BitArchiveStoreState
        lastchanged - Time for when this state was set
    • Method Detail

      • getState

        public ReplicaStoreState getState()
        Return the current BitArchiveStoreState.
        Returns:
        the current BitArchiveStoreState
      • setState

        public void setState​(ReplicaStoreState state,
                             Date lastDate)
                      throws ArgumentNotValid
        Sets the current ReplicaStoreState.
        Parameters:
        state - The ReplicaStoreState.
        lastDate - The lastchanged date.
        Throws:
        ArgumentNotValid - If the state or the lastDate is null.
      • setState

        public void setState​(ReplicaStoreState state)
                      throws ArgumentNotValid
        Sets the current ReplicaStoreState. As a sideeffect lastchanged is set to NOW.
        Parameters:
        state - the ReplicaStoreState.
        Throws:
        ArgumentNotValid - If the state is null.
      • getLastChanged

        public Date getLastChanged()
        Get the Date for when the state was lastchanged.
        Returns:
        the Date for when the state was lastchanged
      • toString

        public String toString()
        Creates an string representation of this instance.
        Overrides:
        toString in class Object
        Returns:
        The string representation of this instance.