org.glite.security.voms.database.cache
Interface Cacheable

All Superinterfaces:
java.lang.Cloneable
All Known Implementing Classes:
DBACL, DBAdmin, TimedCacheable

public interface Cacheable
extends java.lang.Cloneable

Implement the Cacheable interface in an active row to enable it to be cached by RowCache.

In addition to these methods, the active row class must call Update.registerChange() in each method that modifies a cached instance, to guarantee timely propagation of changes between transactions inside the same service instance.

Author:
Karoly Lorentey
See Also:
RowCache, TimedCacheable, Update

Method Summary
 java.lang.Object clone()
          Return a copy of this instance.
 java.lang.Object[] getKeys()
          Return the keys that are used to refer to this instance in RowCache.
 boolean needsRefresh()
          Return true if it is time to refresh this row.
 void refresh()
          Refresh this row, i.e. retrieve it again from the database.
 

Method Detail

needsRefresh

public boolean needsRefresh()
Return true if it is time to refresh this row.


refresh

public void refresh()
             throws GeneralDatabaseException
Refresh this row, i.e. retrieve it again from the database.

Throws:
GeneralDatabaseException

getKeys

public java.lang.Object[] getKeys()
Return the keys that are used to refer to this instance in RowCache.


clone

public java.lang.Object clone()
Return a copy of this instance. The copy must not share mutable data with the original instance.