Constructor and Description |
---|
LRULog(File pFile,
IDataFactory pDataFac,
IMetaEntryFactory pMetaFac)
Creates a new LRU cache.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closing the log.
|
LogValue |
get(LogKey pKey)
Getting a
LogValue for a given key |
org.treetank.io.LRULog.LogIterator |
getIterator()
Returning all elements as Iterator.
|
boolean |
isClosed()
Check if log is closed or not.
|
void |
put(LogKey pKey,
LogValue pValue)
Putting a new entry to the log, overriding already existing entries.
|
String |
toString() |
public LRULog(File pFile, IDataFactory pDataFac, IMetaEntryFactory pMetaFac) throws TTIOException
pFile
- Location of the cache.pDataFac
- DataFactory for generating datas adhering to the used interfacepMetaFac
- MetaFactory for generating meta-entries adhering to the used interfaceTTIOException
public LogValue get(LogKey pKey) throws TTIOException
LogValue
for a given keyget
in interface ILog
pKey
- the keyLogValue
if present, false otherwiseTTIOException
public void put(LogKey pKey, LogValue pValue) throws TTIOException
put
in interface ILog
pKey
- to be setpValue
- to be setTTIOException
public void close() throws TTIOException
close
in interface ILog
TTIOException
public boolean isClosed()
public org.treetank.io.LRULog.LogIterator getIterator()
Copyright © 2013. All Rights Reserved.