|
Project JXTA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.jxta.impl.xindice.core.filer.MemFiler
public final class MemFiler
MemFiler is an In-Memory Filer implementation for Xindice. MemFiler can be used for temporary collections and caching. It's basically a layering on top of HashMap.
| Constructor Summary | |
|---|---|
MemFiler()
|
|
MemFiler(Map hashTable)
|
|
MemFiler(Map hashTable,
boolean readOnly)
|
|
| Method Summary | |
|---|---|
boolean |
close()
close closes the DBObject |
boolean |
create()
create creates a new DBObject and any associated resources for the new DBObject, such as disk files, etc. |
boolean |
deleteRecord(Key key)
deleteRecord removes a Record from the Filer based on the specified Key. |
boolean |
drop()
drop instructs the DBObjectimplementation to remove itself from existence. |
boolean |
exists()
exists returns whether or not a physical representation of this DBObject actually exists. |
void |
flush()
flush forcefully flushes any unwritten buffers to disk. |
String |
getName()
getName retrieves the contextually important name of the object |
long |
getRecordCount()
getRecordCount returns the number of Records in the Filer. |
RecordSet |
getRecordSet()
getRecordSet returns a RecordSet object for the current Filer. |
boolean |
isOpened()
isOpened returns whether or not the DBObject is opened for business. |
boolean |
open()
open opens the DBObject |
Record |
readRecord(Key key)
readRecord returns a Record from the Filer based on the specified Key. |
Record |
readRecord(long pos)
readRecord returns a Record from the Filer at the specified position. |
void |
setLocation(File root,
String location)
|
long |
writeRecord(Key key,
Value value)
writeRecord writes a Value to the Filer based on the specified Key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MemFiler()
public MemFiler(Map hashTable,
boolean readOnly)
public MemFiler(Map hashTable)
| Method Detail |
|---|
public void setLocation(File root,
String location)
public String getName()
Named
getName in interface Namedpublic boolean create()
DBObject
create in interface DBObjectpublic boolean open()
DBObject
open in interface DBObjectpublic boolean isOpened()
DBObject
isOpened in interface DBObjectpublic boolean exists()
DBObject
exists in interface DBObjectpublic boolean drop()
DBObject
drop in interface DBObjectpublic boolean close()
DBObject
close in interface DBObjectpublic void flush()
Filer
flush in interface Filer
public Record readRecord(Key key)
throws DBException
Filer
readRecord in interface Filerkey - The Record's Key
DBException
public Record readRecord(long pos)
throws DBException
Filer
readRecord in interface Filerpos - The Record's position
DBException
public long writeRecord(Key key,
Value value)
throws DBException
Filer
writeRecord in interface Filerkey - The Record's Keyvalue - The Record's Value
DBException
public boolean deleteRecord(Key key)
throws DBException
Filer
deleteRecord in interface Filerkey - The Record's Key
DBException
public long getRecordCount()
throws DBException
Filer
getRecordCount in interface FilerDBException
public RecordSet getRecordSet()
throws DBException
Filer
getRecordSet in interface FilerDBException
|
JXTA J2SE | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||