|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dbxml.core.filer.Paged
org.dbxml.core.filer.BTree
org.exist.storage.store.BFile
Data store for variable size values. This class maps keys to values of variable size. Keys are stored in the b+-tree. B+-tree values are pointers to the logical storage address of the value in the data section. The pointer consists of the page number and a logical tuple identifier. If a value is larger than the internal page size (4K), it is split into overflow pages. Appending data to a overflow page is very fast. Only the first and the last data page are loaded. Data pages are buffered.
Nested Class Summary | |
protected class |
BFile.ClockPageBuffer
|
static interface |
BFile.PageInputStream
|
Nested classes inherited from class org.dbxml.core.filer.BTree |
org.dbxml.core.filer.BTree.BTreeFileHeader, org.dbxml.core.filer.BTree.BTreeNode, org.dbxml.core.filer.BTree.BTreePageHeader, org.dbxml.core.filer.BTree.ClockNodeBuffer |
Nested classes inherited from class org.dbxml.core.filer.Paged |
org.dbxml.core.filer.Paged.FileHeader, org.dbxml.core.filer.Paged.Page, org.dbxml.core.filer.Paged.PageHeader |
Field Summary | |
protected boolean |
compressPages
|
protected org.exist.storage.store.BFile.BFileHeader |
fileHeader
|
int |
fixedKeyLen
|
static byte |
FREE_LIST
Description of the Field |
static byte |
LOB
Description of the Field |
protected Lock |
lock
|
protected int |
minFree
|
static byte |
MULTI_PAGE
Description of the Field |
static int |
PAGE_MIN_FREE
|
protected BFile.ClockPageBuffer |
pages
|
static byte |
RECORD
|
Fields inherited from class org.dbxml.core.filer.BTree |
BRANCH, KEY_NOT_FOUND, LEAF, STREAM |
Fields inherited from class org.dbxml.core.filer.Paged |
DELETED, OVERFLOW, PAGE_SIZE, UNUSED |
Constructor Summary | |
BFile()
Constructor for the BFile object |
|
BFile(java.io.File file)
Constructor for the BFile object |
|
BFile(java.io.File file,
int buffers)
Constructor for the BFile object |
|
BFile(java.io.File file,
int btreeBuffers,
int dataBuffers)
Constructor for the BFile object |
Method Summary | |
long |
append(org.dbxml.core.data.Value key,
ByteArray value)
|
boolean |
close()
Description of the Method |
boolean |
containsKey(org.dbxml.core.data.Value key)
Description of the Method |
boolean |
create()
Description of the Method |
org.dbxml.core.filer.Paged.FileHeader |
createFileHeader()
Description of the Method |
org.dbxml.core.filer.Paged.FileHeader |
createFileHeader(boolean read)
Description of the Method |
org.dbxml.core.filer.Paged.FileHeader |
createFileHeader(long pageCount)
Description of the Method |
org.dbxml.core.filer.Paged.FileHeader |
createFileHeader(long pageCount,
int pageSize)
Description of the Method |
org.dbxml.core.filer.Paged.PageHeader |
createPageHeader()
Description of the Method |
void |
filter(org.dbxml.core.indexer.IndexQuery query,
BFileCallback callback)
Description of the Method |
void |
find(org.dbxml.core.indexer.IndexQuery query,
IndexCallback callback)
|
java.util.ArrayList |
findEntries(org.dbxml.core.indexer.IndexQuery query)
Description of the Method |
java.util.ArrayList |
findKeys(org.dbxml.core.indexer.IndexQuery query)
Description of the Method |
java.util.ArrayList |
findValues(org.dbxml.core.indexer.IndexQuery query)
|
boolean |
flush()
|
protected org.dbxml.core.data.Value |
get(org.exist.storage.store.BFile.DataPage page,
long p)
Retrieve value at logical address p from page |
org.dbxml.core.data.Value |
get(long p)
Description of the Method |
org.dbxml.core.data.Value |
get(org.dbxml.core.data.Value key)
|
java.io.InputStream |
getAsStream(long pointer)
|
java.io.InputStream |
getAsStream(org.dbxml.core.data.Value key)
|
BufferStats |
getDataBufferStats()
|
java.util.ArrayList |
getEntries()
Gets the entries attribute of the BFile object |
java.util.ArrayList |
getKeys()
Gets the keys attribute of the BFile object |
Lock |
getLock()
Returns the Lock object responsible for this BFile. |
java.util.ArrayList |
getValues()
Gets the values attribute of the BFile object |
int |
getValueSize(org.dbxml.core.data.Value key)
|
boolean |
open()
Description of the Method |
void |
printStatistics()
|
long |
put(org.dbxml.core.data.Value key,
byte[] data,
boolean overwrite)
|
long |
put(org.dbxml.core.data.Value key,
ByteArray value)
Description of the Method |
long |
put(org.dbxml.core.data.Value key,
ByteArray value,
boolean overwrite)
Description of the Method |
protected void |
remove(org.exist.storage.store.BFile.DataPage page,
long p)
Description of the Method |
void |
remove(long p)
|
void |
remove(org.dbxml.core.data.Value key)
Description of the Method |
void |
removeAll(org.dbxml.core.indexer.IndexQuery query)
|
void |
setCompression(boolean compress)
Sets the compression attribute of the BFile object |
void |
setLocation(java.lang.String location)
Sets the location attribute of the BFile object |
protected long |
update(long p,
org.exist.storage.store.BFile.DataPage page,
org.dbxml.core.data.Value key,
ByteArray value)
Update the key/value pair with logical address p and stored in page. |
long |
update(long p,
org.dbxml.core.data.Value key,
ByteArray value)
Update the key/value pair found at the logical address p. |
long |
update(org.dbxml.core.data.Value key,
ByteArray value)
Update a key/value pair. |
Methods inherited from class org.dbxml.core.filer.BTree |
addValue, clear, create, createRootNode, drop, findValue, getFixedKeyLen, getIndexBufferStats, getRootNode, query, remove, remove, removeValue, setRootNode |
Methods inherited from class org.dbxml.core.filer.Paged |
deleteArrayInt, deleteArrayLong, deleteArrayShort, deleteArrayValue, exists, getFile, getFileHeader, getFreePage, getPage, getPageSize, insertArrayInt, insertArrayLong, insertArrayShort, insertArrayValue, isOpened, isReadOnly, setFile, setPageSize, unlinkPages, unlinkPages, writeValue, writeValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final byte FREE_LIST
public static final byte LOB
public static final byte MULTI_PAGE
public static final int PAGE_MIN_FREE
public static final byte RECORD
protected boolean compressPages
protected org.exist.storage.store.BFile.BFileHeader fileHeader
protected int minFree
protected BFile.ClockPageBuffer pages
protected Lock lock
public int fixedKeyLen
Constructor Detail |
public BFile()
public BFile(java.io.File file)
file
- Description of the Parameterpublic BFile(java.io.File file, int buffers)
file
- Description of the Parameterbuffers
- Description of the Parameterpublic BFile(java.io.File file, int btreeBuffers, int dataBuffers)
file
- Description of the ParameterbtreeBuffers
- Description of the ParameterdataBuffers
- Description of the ParameterMethod Detail |
public Lock getLock()
public long append(org.dbxml.core.data.Value key, ByteArray value) throws ReadOnlyException
ReadOnlyException
public boolean close() throws org.dbxml.core.DBException
org.dbxml.core.DBException
- Description of the Exceptionpublic boolean containsKey(org.dbxml.core.data.Value key)
key
- Description of the Parameter
public boolean create() throws org.dbxml.core.DBException
org.dbxml.core.DBException
- Description of the Exceptionpublic org.dbxml.core.filer.Paged.FileHeader createFileHeader()
public org.dbxml.core.filer.Paged.FileHeader createFileHeader(boolean read) throws java.io.IOException
read
- Description of the Parameter
java.io.IOException
- Description of the Exceptionpublic org.dbxml.core.filer.Paged.FileHeader createFileHeader(long pageCount)
pageCount
- Description of the Parameter
public org.dbxml.core.filer.Paged.FileHeader createFileHeader(long pageCount, int pageSize)
pageCount
- Description of the ParameterpageSize
- Description of the Parameter
public org.dbxml.core.filer.Paged.PageHeader createPageHeader()
public void filter(org.dbxml.core.indexer.IndexQuery query, BFileCallback callback) throws java.io.IOException, org.dbxml.core.filer.BTreeException
query
- Description of the Parametercallback
- Description of the Parameter
java.io.IOException
- Description of the Exception
org.dbxml.core.filer.BTreeException
- Description of the Exceptionpublic void removeAll(org.dbxml.core.indexer.IndexQuery query) throws java.io.IOException, org.dbxml.core.filer.BTreeException
java.io.IOException
org.dbxml.core.filer.BTreeException
public java.util.ArrayList findEntries(org.dbxml.core.indexer.IndexQuery query) throws java.io.IOException, org.dbxml.core.filer.BTreeException
query
- Description of the Parameter
java.io.IOException
- Description of the Exception
org.dbxml.core.filer.BTreeException
- Description of the Exceptionpublic java.util.ArrayList findKeys(org.dbxml.core.indexer.IndexQuery query) throws java.io.IOException, org.dbxml.core.filer.BTreeException
query
- Description of the Parameter
java.io.IOException
- Description of the Exception
org.dbxml.core.filer.BTreeException
- Description of the Exceptionpublic void find(org.dbxml.core.indexer.IndexQuery query, IndexCallback callback) throws java.io.IOException, org.dbxml.core.filer.BTreeException
java.io.IOException
org.dbxml.core.filer.BTreeException
public java.util.ArrayList findValues(org.dbxml.core.indexer.IndexQuery query) throws java.io.IOException, org.dbxml.core.filer.BTreeException
java.io.IOException
org.dbxml.core.filer.BTreeException
public boolean flush() throws org.dbxml.core.DBException
org.dbxml.core.DBException
public BufferStats getDataBufferStats()
public void printStatistics()
public org.dbxml.core.data.Value get(org.dbxml.core.data.Value key)
public java.io.InputStream getAsStream(org.dbxml.core.data.Value key)
public java.io.InputStream getAsStream(long pointer)
public int getValueSize(org.dbxml.core.data.Value key)
public org.dbxml.core.data.Value get(long p)
p
- Description of the Parameter
protected org.dbxml.core.data.Value get(org.exist.storage.store.BFile.DataPage page, long p) throws org.dbxml.core.filer.BTreeException, java.io.IOException
page
- Description of the Parameterp
- Description of the Parameter
org.dbxml.core.filer.BTreeException
- Description of the Exception
java.io.IOException
- Description of the Exceptionpublic java.util.ArrayList getEntries() throws java.io.IOException, org.dbxml.core.filer.BTreeException
java.io.IOException
- Description of the Exception
org.dbxml.core.filer.BTreeException
- Description of the Exceptionpublic java.util.ArrayList getKeys() throws java.io.IOException, org.dbxml.core.filer.BTreeException
java.io.IOException
- Description of the Exception
org.dbxml.core.filer.BTreeException
- Description of the Exceptionpublic java.util.ArrayList getValues() throws java.io.IOException, org.dbxml.core.filer.BTreeException
java.io.IOException
- Description of the Exception
org.dbxml.core.filer.BTreeException
- Description of the Exceptionpublic boolean open() throws org.dbxml.core.DBException
org.dbxml.core.DBException
- Description of the Exceptionpublic long put(org.dbxml.core.data.Value key, byte[] data, boolean overwrite) throws ReadOnlyException
ReadOnlyException
public long put(org.dbxml.core.data.Value key, ByteArray value) throws ReadOnlyException
key
- Description of the Parametervalue
- Description of the Parameter
ReadOnlyException
public long put(org.dbxml.core.data.Value key, ByteArray value, boolean overwrite) throws ReadOnlyException
key
- Description of the Parametervalue
- Description of the Parameteroverwrite
- Description of the Parameter
ReadOnlyException
public void remove(org.dbxml.core.data.Value key) throws ReadOnlyException
key
- Description of the Parameter
ReadOnlyException
public void remove(long p) throws ReadOnlyException
ReadOnlyException
protected void remove(org.exist.storage.store.BFile.DataPage page, long p) throws org.dbxml.core.filer.BTreeException, java.io.IOException, ReadOnlyException
page
- Description of the Parameterp
- Description of the Parameter
org.dbxml.core.filer.BTreeException
- Description of the Exception
java.io.IOException
- Description of the Exception
ReadOnlyException
public void setCompression(boolean compress)
compress
- The new compression valuepublic void setLocation(java.lang.String location)
location
- The new location valuepublic long update(org.dbxml.core.data.Value key, ByteArray value) throws ReadOnlyException
key
- Description of the Parametervalue
- Description of the Parameter
ReadOnlyException
public long update(long p, org.dbxml.core.data.Value key, ByteArray value) throws ReadOnlyException
p
- Description of the Parameterkey
- Description of the Parametervalue
- Description of the Parameter
ReadOnlyException
protected long update(long p, org.exist.storage.store.BFile.DataPage page, org.dbxml.core.data.Value key, ByteArray value) throws org.dbxml.core.filer.BTreeException, java.io.IOException, ReadOnlyException
p
- Description of the Parameterpage
- Description of the Parameterkey
- Description of the Parametervalue
- Description of the Parameter
org.dbxml.core.filer.BTreeException
- Description of the Exception
java.io.IOException
- Description of the Exception
ReadOnlyException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |