|
dbXML API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dbxml.util.SimpleConfigurable
com.dbxml.db.common.filers.MemFiler
MemFiler is an In-Memory Filer implementation for dbXML. MemFiler can be used for temporary collections and caching. It's basically a layering on top of HashMap.
Constructor Summary | |
MemFiler()
|
|
MemFiler(java.util.Map records)
|
|
MemFiler(java.util.Map records,
boolean readOnly)
|
Method Summary | |
boolean |
close()
close closes the Filer |
boolean |
create()
create creates a new Filer and any associated resources for the new Filer, such as disk files, etc. |
boolean |
deleteRecord(Transaction tx,
Key key)
deleteRecord removes a Record from the Filer based on the specified Key. |
boolean |
drop()
drop instructs the Filerimplementation to remove itself from existence. |
boolean |
exists()
exists returns whether or not a physical representation of this Filer actually exists. |
void |
flush(Transaction tx)
flush forcefully flushes any unwritten buffers to disk. |
java.lang.String |
getName()
getName returns the name of this Filer. |
long |
getRecordCount(Transaction tx)
getRecordCount returns the number of Records in the Filer. |
RecordMetaData |
getRecordMetaData(Transaction tx,
Key key)
getRecordMetaData returns metadata about the Record identified by the provided Key. |
RecordSet |
getRecordSet(Transaction tx)
getRecordSet returns a RecordSet object for the current Filer. |
TransactionLog |
getTransactionLog()
getTransactionLog returns the Transaction Log for this Filer. |
boolean |
isOpened()
isOpened returns whether or not the Filer is opened for business. |
boolean |
open()
open opens the Filer |
Record |
readRecord(Transaction tx,
Key key)
readRecord returns a Record from the Filer based on the specified Key. |
void |
setCollection(Collection collection)
setCollection tells the Filer who its parent is. |
boolean |
writeRecord(Transaction tx,
Key key,
Value value)
writeRecord writes a Value to the Filer based on the specified Key. |
Methods inherited from class com.dbxml.util.SimpleConfigurable |
getConfig, setConfig |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.dbxml.util.Configurable |
getConfig, setConfig |
Constructor Detail |
public MemFiler()
public MemFiler(java.util.Map records, boolean readOnly)
public MemFiler(java.util.Map records)
Method Detail |
public void setCollection(Collection collection)
Filer
setCollection
in interface Filer
collection
- The owner Collectionpublic java.lang.String getName()
Filer
getName
in interface Filer
public boolean create()
Filer
create
in interface Filer
public boolean open()
Filer
open
in interface Filer
public boolean isOpened()
Filer
isOpened
in interface Filer
public boolean exists()
Filer
exists
in interface Filer
public boolean drop()
Filer
drop
in interface Filer
public boolean close()
Filer
close
in interface Filer
public void flush(Transaction tx)
Filer
flush
in interface Filer
tx
- The controlling Transactionpublic RecordMetaData getRecordMetaData(Transaction tx, Key key) throws DBException
Filer
getRecordMetaData
in interface Filer
tx
- The controlling Transactionkey
- The Record's Key
DBException
public Record readRecord(Transaction tx, Key key) throws DBException
Filer
readRecord
in interface Filer
tx
- The controlling Transactionkey
- The Record's Key
DBException
public boolean writeRecord(Transaction tx, Key key, Value value) throws DBException
Filer
writeRecord
in interface Filer
tx
- The controlling Transactionkey
- The Record's Keyvalue
- The Record's Value
DBException
public boolean deleteRecord(Transaction tx, Key key) throws DBException
Filer
deleteRecord
in interface Filer
tx
- The controlling Transactionkey
- The Record's Key
DBException
public long getRecordCount(Transaction tx) throws DBException
Filer
getRecordCount
in interface Filer
tx
- The controlling Transaction
DBException
public RecordSet getRecordSet(Transaction tx) throws DBException
Filer
getRecordSet
in interface Filer
tx
- The controlling Transaction
DBException
public TransactionLog getTransactionLog()
Filer
getTransactionLog
in interface Filer
|
dbXML API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |