org.apache.labs.bananadb.store
Class Accessor

java.lang.Object
  extended by org.apache.labs.bananadb.store.Accessor

public class Accessor
extends java.lang.Object

File system access interface. This class hold the write lock and the random access files. It is thus not thread safe!

Since:
2009-mar-16 14:20:33
Author:
kalle
See Also:
Store.createAccessor(boolean)

Nested Class Summary
static class Accessor.RequestPartitionWriterResponse<T extends FileHandler>
           
 
Method Summary
 void close()
           
 java.lang.String getAccess()
           
 HashCodesPartition getHashCodesPartition(int partitionId)
           
 Hashtable getHashtable()
           
 KeysPartition getKeysPartition(int partitionId)
           
 Metadata getMetadata()
           
 Store getStore()
           
 Lock getStoreWriteLock()
           
 ValuesPartition getValuesPartition(int partitionId)
           
 long increaseStoreRevision()
           
 Accessor.RequestPartitionWriterResponse<HashCodesPartition> requestValueWrite(HashCodesPartition.Posting posting)
          Require write lock!
 Accessor.RequestPartitionWriterResponse<KeysPartition> requestValueWrite(KeysPartition.Posting posting)
          Require write lock!
 Accessor.RequestPartitionWriterResponse<ValuesPartition> requestValueWrite(ValuesPartition.Posting posting)
          Require write lock!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

increaseStoreRevision

public long increaseStoreRevision()
                           throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

getMetadata

public Metadata getMetadata()
                     throws java.io.IOException
Throws:
java.io.IOException

getHashtable

public Hashtable getHashtable()
                       throws java.io.IOException
Throws:
java.io.IOException

getHashCodesPartition

public HashCodesPartition getHashCodesPartition(int partitionId)
                                         throws java.io.IOException
Throws:
java.io.IOException

getKeysPartition

public KeysPartition getKeysPartition(int partitionId)
                               throws java.io.IOException
Throws:
java.io.IOException

getValuesPartition

public ValuesPartition getValuesPartition(int partitionId)
                                   throws java.io.IOException
Throws:
java.io.IOException

requestValueWrite

public Accessor.RequestPartitionWriterResponse<ValuesPartition> requestValueWrite(ValuesPartition.Posting posting)
                                                                           throws java.io.IOException
Require write lock!

Parameters:
posting -
Returns:
Throws:
java.io.IOException

requestValueWrite

public Accessor.RequestPartitionWriterResponse<KeysPartition> requestValueWrite(KeysPartition.Posting posting)
                                                                         throws java.io.IOException
Require write lock!

Parameters:
posting -
Returns:
Throws:
java.io.IOException

requestValueWrite

public Accessor.RequestPartitionWriterResponse<HashCodesPartition> requestValueWrite(HashCodesPartition.Posting posting)
                                                                              throws java.io.IOException
Require write lock!

Parameters:
posting -
Returns:
Throws:
java.io.IOException

getStoreWriteLock

public Lock getStoreWriteLock()

getStore

public Store getStore()

getAccess

public java.lang.String getAccess()


Copyright © 2009 Apache Software Foundation. All Rights Reserved.