com.caucho.server.cluster
Class Store

java.lang.Object
  extended by com.caucho.server.cluster.Store

public class Store
extends java.lang.Object

Application view of the store.


Field Summary
protected static java.util.logging.Logger log
           
 
Method Summary
 void access(java.lang.String objectId)
          Updates the object's access time.
 ClusterObject createClusterObject(java.lang.String objectId)
          Returns a ClusterObject.
 long getAccessWindowTime()
          Returns the length of time an idle object can remain in the store before being cleaned.
 java.lang.String getId()
          Gets the store identifier.
 long getMaxIdleTime()
          Returns the max idle time.
 ObjectManager getObjectManager()
          Returns the object manager.
 StoreManager getStoreManager()
          Returns the store manager.
 boolean isAlwaysLoad()
          Returns true if the object should always be loaded.
 boolean isAlwaysSave()
          Returns true if the object should always be saved.
 void remove(java.lang.String objectId)
          When the object is no longer valid, remove it from the backing store.
 void setAlwaysLoad(boolean isAlwaysLoad)
          Set true if the object should always be loaded.
 void setAlwaysSave(boolean isAlwaysSave)
          Set true if the object should always be saved.
 void setMaxIdleTime(long maxIdleTime)
          Sets the max idle time.
 void setObjectManager(ObjectManager obj)
          Sets the object manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final java.util.logging.Logger log
Method Detail

getId

public java.lang.String getId()
Gets the store identifier.


getMaxIdleTime

public long getMaxIdleTime()
Returns the max idle time.


setMaxIdleTime

public void setMaxIdleTime(long maxIdleTime)
Sets the max idle time.


getAccessWindowTime

public long getAccessWindowTime()
Returns the length of time an idle object can remain in the store before being cleaned.


isAlwaysLoad

public boolean isAlwaysLoad()
Returns true if the object should always be loaded.


setAlwaysLoad

public void setAlwaysLoad(boolean isAlwaysLoad)
Set true if the object should always be loaded.


setAlwaysSave

public void setAlwaysSave(boolean isAlwaysSave)
Set true if the object should always be saved.


isAlwaysSave

public boolean isAlwaysSave()
Returns true if the object should always be saved.


getObjectManager

public ObjectManager getObjectManager()
Returns the object manager.


setObjectManager

public void setObjectManager(ObjectManager obj)
Sets the object manager.


getStoreManager

public StoreManager getStoreManager()
Returns the store manager.


createClusterObject

public ClusterObject createClusterObject(java.lang.String objectId)
Returns a ClusterObject.


access

public void access(java.lang.String objectId)
            throws java.lang.Exception
Updates the object's access time.

Parameters:
obj - the object to update.
Throws:
java.lang.Exception

remove

public void remove(java.lang.String objectId)
            throws java.lang.Exception
When the object is no longer valid, remove it from the backing store.

Parameters:
key - the object's id
Throws:
java.lang.Exception