dk.netarkivet.archive.arcrepositoryadmin
Class ArchiveStoreState

java.lang.Object
  extended by dk.netarkivet.archive.arcrepositoryadmin.ArchiveStoreState

public class ArchiveStoreState
extends java.lang.Object

This class contains a storestate, and the time, when it was last set.


Constructor Summary
ArchiveStoreState(ReplicaStoreState storestate)
          Constructor for this class.
ArchiveStoreState(ReplicaStoreState storestate, java.util.Date lastchanged)
          Constructor for this class.
 
Method Summary
 java.util.Date getLastChanged()
          Get the Date for when the state was lastchanged.
 ReplicaStoreState getState()
          Return the current BitArchiveStoreState.
 void setState(ReplicaStoreState storestate)
          Sets the current BitarchiveStoreState.
 void setState(ReplicaStoreState storestate, java.util.Date lastchanged)
          Sets the current BitarchiveStoreState.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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,
                         java.util.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 storestate,
                     java.util.Date lastchanged)
Sets the current BitarchiveStoreState.

Parameters:
storestate - the BitarchiveStoreState
lastchanged - the lastchanged

setState

public void setState(ReplicaStoreState storestate)
Sets the current BitarchiveStoreState. As a sideeffect lastchanged is set to NOW.

Parameters:
storestate - the BitarchiveStoreState

getLastChanged

public java.util.Date getLastChanged()
Get the Date for when the state was lastchanged.

Returns:
the Date for when the state was lastchanged

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object