Class BTreeFiler
package: src.net.jxta.impl.xindice.core.filer
net.jxta.impl.xindice.core.filer.Paged
  |
  +--net.jxta.impl.xindice.core.filer.BTree
       |
       +--net.jxta.impl.xindice.core.filer.BTreeFiler
public final class BTreeFiler
Extends:
net.jxta.impl.xindice.core.filer.BTree
Implements:
net.jxta.impl.xindice.core.filer.Filer
BTreeFiler is a Filer implementation based on the BTree class.
Inner Class Summary
private static class
   BTreeFilerHeader
 
private static class
   BTreeFilerPageHeader
 
private final static class
   BTreeFilerRecordSet
 
Field Summary
private long
private long
private long
private long
private long
private Iterator
private List
private final static int
private final static short
private final static short
protected final static byte
Constructor Summary
public
public
public
BTreeFilerHeader(boolean read)
public
BTreeFilerHeader(long pageCount)
public
BTreeFilerHeader(long pageCount, int pageSize)
public
public
BTreeFilerPageHeader(DataInputStream dis)
public
Method Summary
public synchronized long
   The total number of bytes in use by the file
 
public synchronized void
read(RandomAccessFile raf)
public synchronized void
setTotalBytes(long totalBytes)
   The total number of bytes in use by the file
 
public synchronized void
write(RandomAccessFile raf)
public synchronized long
   UNIX-time when this record was created
 
public synchronized long
   JXTA-expiration this record's expiration
 
public synchronized long
   JXTA-lifetime this record's lifetime
 
public synchronized long
   UNIX-time when this record was last modified
 
public synchronized void
read(DataInputStream dis)
public synchronized void
setCreated(long created)
   UNIX-time when this record was created
 
public synchronized void
setExpiration(long expiration)
   JXTA-expiration this record's expiration
 
public synchronized void
setLifetime(long lifetime)
   JXTA-lifetime this record's lifetime
 
public synchronized void
setModified(long modified)
   UNIX-time when this record was last modified
 
public synchronized void
setRecordLen(int recordLen)
public synchronized void
write(DataOutputStream dos)
public synchronized Key
public synchronized Record
public synchronized Value
public synchronized boolean
public synchronized boolean
indexInfo(Value value, long pointer)
public boolean
public FileHeader
public FileHeader
createFileHeader(boolean read)
public FileHeader
createFileHeader(long pageCount)
public FileHeader
createFileHeader(long pageCount, int pageSize)
public PageHeader
public boolean
public void
public String
public long
public RecordSet
public boolean
public Record
readRecord(long pos)
public Record
public void
setLocation(String dir, String file)
public long
writeRecord(long pos, Value value)
public long
writeRecord(Key key, Value value)
public long
writeRecord(Key key, Value value, long lifetime, long expiration)
Field Detail
DBE_CANNOT_READ
private final static int DBE_CANNOT_READ = (int) (572l)

fileHeader
private BTreeFiler.BTreeFilerHeader fileHeader

MAXKEYSIZE
private final static short MAXKEYSIZE = 256

PAGESIZE
private final static short PAGESIZE = 512

RECORD
protected final static byte RECORD = 20
Constructor Detail
BTreeFiler
public BTreeFiler()
Method Detail
create
public boolean create()
Throws:
DBException

createFileHeader
public FileHeader createFileHeader(long pageCount, int pageSize)

createFileHeader
public FileHeader createFileHeader(long pageCount)

createFileHeader
public FileHeader createFileHeader(boolean read)
Throws:
IOException

createFileHeader
public FileHeader createFileHeader()

createPageHeader
public PageHeader createPageHeader()

deleteRecord
public boolean deleteRecord(Key key)
Throws:
DBException

flush
public void flush()
Throws:
DBException

getName
public String getName()

getRecordCount
public long getRecordCount()
Throws:
DBException

getRecordSet
public RecordSet getRecordSet()
Throws:
DBException

open
public boolean open()
Throws:
DBException

readRecord
public Record readRecord(Key key)
Throws:
DBException

readRecord
public Record readRecord(long pos)
Throws:
DBException

setLocation
public void setLocation(String dir, String file)

writeRecord
public long writeRecord(Key key, Value value)
Throws:
DBException

writeRecord
public long writeRecord(Key key, Value value, long lifetime, long expiration)
Throws:
DBException

writeRecord
public long writeRecord(long pos, Value value)
Throws:
DBException