Class ArchiveStoreState
- java.lang.Object
-
- dk.netarkivet.archive.arcrepositoryadmin.ArchiveStoreState
-
public class ArchiveStoreState extends Object
This class contains a storestate, and the time, when it was last set.
-
-
Constructor Summary
Constructors Constructor Description ArchiveStoreState(ReplicaStoreState storestate)
Constructor for this class.ArchiveStoreState(ReplicaStoreState storestate, Date lastchanged)
Constructor for this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Date
getLastChanged()
Get the Date for when the state was lastchanged.ReplicaStoreState
getState()
Return the current BitArchiveStoreState.void
setState(ReplicaStoreState state)
Sets the current ReplicaStoreState.void
setState(ReplicaStoreState state, Date lastDate)
Sets the current ReplicaStoreState.String
toString()
Creates an string representation of this instance.
-
-
-
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 BitArchiveStoreStatelastchanged
- 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
-
-