|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ados.hestia.utils.db.KeyProcessor
public abstract class KeyProcessor
Helper class which provide support of IStore and Containers.
IStore
,
Container
Field Summary | |
---|---|
protected KeyDescriptor |
m_descriptor
|
protected static HestiaLogger |
m_log
|
protected long |
m_modification
|
protected Processor |
m_processor
|
protected Properties |
m_properties
|
protected StoreRepository |
m_repository
|
Constructor Summary | |
---|---|
protected |
KeyProcessor(StoreRepository repository,
Properties properties,
KeyDescriptor descriptor)
Constructor. |
Method Summary | |
---|---|
void |
close()
Close processor. |
protected static void |
closeSafe(Object stream)
Safely close output or input stream. |
protected void |
closeStore(IStore store)
Close store by deleting it from StoreRepository. |
protected IStore |
containerToTempStore(Container container)
Serialize container to temporary store. |
protected static void |
errorToCollectorError(Throwable e)
Convert common error to CollectorException. |
protected Container |
getContainerFromProcessor(String id)
Extract Container with specific id from processor. |
long |
getModificationStatus()
Returns current revision of processor's entries. |
Processor |
getProcessor()
Returns processor. |
protected StoreRepository |
getRepository()
Return reference to StoreRepository to support access to IStore. |
protected void |
updateModification()
Update modification status. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Processor m_processor
protected KeyDescriptor m_descriptor
protected StoreRepository m_repository
protected Properties m_properties
protected long m_modification
protected static HestiaLogger m_log
Constructor Detail |
---|
protected KeyProcessor(StoreRepository repository, Properties properties, KeyDescriptor descriptor)
repository
- specify working StoreRepository for IStore access.properties
- connection properties to specific database.descriptor
- provide information how data is stored ad database.Method Detail |
---|
public long getModificationStatus()
protected void updateModification()
public void close()
public Processor getProcessor()
protected static void errorToCollectorError(Throwable e) throws CollectorException
e
- common error to convert.
CollectorException
- always throw.protected static void closeSafe(Object stream)
stream
- stream to close.protected StoreRepository getRepository()
protected IStore containerToTempStore(Container container) throws CollectorException
container
- container to serialize.
CollectorException
- if container cannot be serialized to store.protected void closeStore(IStore store)
store
- specify store to close.protected Container getContainerFromProcessor(String id) throws CollectorException
id
- specify id of contaner to extract.
CollectorException
- if Container cannot be extracted from database.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |