net.obsearch.storage.tc
Class TCOBStorageBytesArray

java.lang.Object
  extended by net.obsearch.storage.tc.AbstractTCOBStorage<TupleBytes>
      extended by net.obsearch.storage.tc.TCOBStorageBytesArray
All Implemented Interfaces:
OBStore<TupleBytes>

public class TCOBStorageBytesArray
extends AbstractTCOBStorage<TupleBytes>


Nested Class Summary
 
Nested classes/interfaces inherited from class net.obsearch.storage.tc.AbstractTCOBStorage
AbstractTCOBStorage.ByteArrayIterator, AbstractTCOBStorage.ByteArrayKeyIterator, AbstractTCOBStorage.CursorIterator<T>
 
Field Summary
 
Fields inherited from class net.obsearch.storage.tc.AbstractTCOBStorage
fact, stats
 
Constructor Summary
TCOBStorageBytesArray(String name, tokyocabinet.DBM db, OBStoreFactory fact, OBStorageConfig conf)
          Builds a new Storage system by receiving a Berkeley DB database.
 
Method Summary
 byte[] prepareBytes(byte[] in)
          Transform Bytes in a format that can be used by the underlying index.
 CloseIterator<TupleBytes> processAll()
          Process all the elements in the DB.
 
Methods inherited from class net.obsearch.storage.tc.AbstractTCOBStorage
allowsDuplicatedData, close, delete, deleteAll, getFactory, getName, getReadStats, getStats, getValue, nextId, optimize, processAllKeys, processRange, processRangeNoDup, processRangeReverse, processRangeReverseNoDup, put, putIfNew, setReadStats, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TCOBStorageBytesArray

public TCOBStorageBytesArray(String name,
                             tokyocabinet.DBM db,
                             OBStoreFactory fact,
                             OBStorageConfig conf)
                      throws OBStorageException,
                             OBException
Builds a new Storage system by receiving a Berkeley DB database.

Parameters:
db - The database to be stored.
name - Name of the database.
fact - the factory of the storage device
duplicates - if duplicates are allowed in this storage
Throws:
DatabaseException - if something goes wrong with the database.
OBStorageException
OBException
Method Detail

processAll

public CloseIterator<TupleBytes> processAll()
                                     throws OBStorageException
Description copied from interface: OBStore
Process all the elements in the DB. Useful for debugging.

Returns:
An iterator that goes through all the data in the DB.
Throws:
OBStorageException

prepareBytes

public byte[] prepareBytes(byte[] in)
Description copied from interface: OBStore
Transform Bytes in a format that can be used by the underlying index.

Parameters:
in - Input byte array
Returns:
transformed bytes ready to be sorted.`


Copyright © 2007-2011 Arnoldo Jose Muller Molina. All Rights Reserved.