org.apache.labs.bananadb.store.data.bananatrie
Class ValuesPartition

java.lang.Object
  extended by org.apache.labs.bananadb.store.data.FileHandler<ValuesPartition.Header,ValuesPartition.Posting>
      extended by org.apache.labs.bananadb.store.data.bananatrie.ValuesPartition

public class ValuesPartition
extends FileHandler<ValuesPartition.Header,ValuesPartition.Posting>

Values postings partition file.

This file is NOT affected by rehashing.

Since:
2009-mar-16 14:00:13
Author:
kalle

Nested Class Summary
static class ValuesPartition.Header
           
static class ValuesPartition.Posting
           
 
Field Summary
static int HEADER_BYTE_SIZE
           
 
Constructor Summary
ValuesPartition(java.io.File directory, int partitionId, java.lang.String access, LockFactory lockFactory)
           
 
Method Summary
 int getHeaderByteSize()
           
 int getPartitionId()
           
 void markPostingAsDeleted(int startOffset, java.io.RandomAccessFile RAF, long revision)
           
 void readHeader(ValuesPartition.Header header, java.io.RandomAccessFile RAF)
           
 void readPosting(ValuesPartition.Posting posting, java.io.RandomAccessFile RAF)
           
 void writeHeader(ValuesPartition.Header header, java.io.RandomAccessFile RAF)
           
 void writePosting(ValuesPartition.Posting posting, java.io.RandomAccessFile RAF)
           
 
Methods inherited from class org.apache.labs.bananadb.store.data.FileHandler
close, exists, format, format, getFile, getLock, getRAF, markPostingAsDeleted, open, readHeader, readHeader, readHeader, readPosting, readPosting, writeHeader, writeHeader, writeHeader, writePosting, writePosting, writePosting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HEADER_BYTE_SIZE

public static final int HEADER_BYTE_SIZE
See Also:
Constant Field Values
Constructor Detail

ValuesPartition

public ValuesPartition(java.io.File directory,
                       int partitionId,
                       java.lang.String access,
                       LockFactory lockFactory)
                throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getHeaderByteSize

public int getHeaderByteSize()
Specified by:
getHeaderByteSize in class FileHandler<ValuesPartition.Header,ValuesPartition.Posting>

getPartitionId

public int getPartitionId()

readHeader

public void readHeader(ValuesPartition.Header header,
                       java.io.RandomAccessFile RAF)
                throws java.io.IOException
Specified by:
readHeader in class FileHandler<ValuesPartition.Header,ValuesPartition.Posting>
Throws:
java.io.IOException

writeHeader

public void writeHeader(ValuesPartition.Header header,
                        java.io.RandomAccessFile RAF)
                 throws java.io.IOException
Specified by:
writeHeader in class FileHandler<ValuesPartition.Header,ValuesPartition.Posting>
Throws:
java.io.IOException

readPosting

public void readPosting(ValuesPartition.Posting posting,
                        java.io.RandomAccessFile RAF)
                 throws java.io.IOException
Specified by:
readPosting in class FileHandler<ValuesPartition.Header,ValuesPartition.Posting>
Throws:
java.io.IOException

writePosting

public void writePosting(ValuesPartition.Posting posting,
                         java.io.RandomAccessFile RAF)
                  throws java.io.IOException
Specified by:
writePosting in class FileHandler<ValuesPartition.Header,ValuesPartition.Posting>
Throws:
java.io.IOException

markPostingAsDeleted

public void markPostingAsDeleted(int startOffset,
                                 java.io.RandomAccessFile RAF,
                                 long revision)
                          throws java.io.IOException
Specified by:
markPostingAsDeleted in class FileHandler<ValuesPartition.Header,ValuesPartition.Posting>
Throws:
java.io.IOException


Copyright © 2009 Apache Software Foundation. All Rights Reserved.