|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.object.ObjectLoaderBase
An implementation of the ObjectLoader interface that provides stub implementations for each of the methods. If your loader doesn't already extend something, its usually more convenient to extend this than implement all of the methods.
Constructor Summary | |
ObjectLoaderBase()
|
Method Summary | |
int |
countObjects(RepositoryResult repoResult)
|
long |
getCacheConsistencyNumber(Type type)
Return a Cache Consistency Number. |
PersistentObject |
loadObject(Type type,
java.lang.String id,
boolean tolerateMissing,
boolean tolerateAuthzFailure,
java.util.Map options)
Load an object from the storage manager. |
java.util.ArrayList |
loadObjects(Type type,
AttributeCondition[] attrConds)
Load all objects of a given type. |
void |
nextBlock(RepositoryResult previousResult)
Load the next blockful of objects into the specified RepositoryResult. |
void |
previousBlock(RepositoryResult previousResult)
Load the previous blockful of objects into the specified RepositoryResult. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ObjectLoaderBase()
Method Detail |
public long getCacheConsistencyNumber(Type type) throws WavesetException
CacheConsistencyNumberLoader
The loader typically runs a database query after some number of calls to this method, and returns the current CCN. The loader typically does NOT query the database on every call to this method. While that would ensure that the cache is always up to date, it would slow things down, defeating some of the purpose of the cache. The loader should maintain a timestamp of the last database query, and reissue the query after a configurable number of seconds has passed. This behavior is put into the loader rather than the cache so we have fewer objects to update in case the CCN "polling interval" changes.
getCacheConsistencyNumber
in interface CacheConsistencyNumberLoader
WavesetException
public PersistentObject loadObject(Type type, java.lang.String id, boolean tolerateMissing, boolean tolerateAuthzFailure, java.util.Map options) throws WavesetException
ObjectLoader
loadObject
in interface ObjectLoader
WavesetException
- if the object was not found in the storage manager, or
an internal error was encountered.public java.util.ArrayList loadObjects(Type type, AttributeCondition[] attrConds) throws WavesetException
ObjectLoader
loadObjects
in interface ObjectLoader
WavesetException
- if an internal error was encountered.public int countObjects(RepositoryResult repoResult)
countObjects
in interface ObjectLoader
public void nextBlock(RepositoryResult previousResult) throws WavesetException
ObjectLoader
nextBlock
in interface ObjectLoader
WavesetException
- if an internal error was encountered.public void previousBlock(RepositoryResult previousResult) throws WavesetException
ObjectLoader
previousBlock
in interface ObjectLoader
WavesetException
- if an internal error was encountered.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |