|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OBStoreFactory
OBStoreFactory defines several methods to facilitate the creation of indexes
by OBSearch's indexes. In general, each index should receive an object that
implements OBStoreFactory and from then, the index will get databases from
the factory as needed. Constructors for each factory are expected to define
how and where the data will be accessed. If the factory cannot provide some
of the requested indexes, an
#net.obsearch.exception.UnsupportedStorageException
is thrown.
Method Summary | |
---|---|
void |
close()
Close the factory. |
OBStore<TupleBytes> |
createOBStore(String name,
OBStorageConfig config)
Creates a generic OBStore. |
OBStoreByte |
createOBStoreByte(String name,
OBStorageConfig config)
Creates an OBStoreByte whose key is based on bytes. |
OBStoreDouble |
createOBStoreDouble(String name,
OBStorageConfig config)
Creates an OBStoreDouble whose key is based on doubles. |
OBStoreFloat |
createOBStoreFloat(String name,
OBStorageConfig config)
Creates an OBStoreFloat whose key is based on floats. |
OBStoreInt |
createOBStoreInt(String name,
OBStorageConfig config)
Creates an OBStoreInt whose key is based on ints. |
OBStoreLong |
createOBStoreLong(String name,
OBStorageConfig config)
Creates an OBStoreLong whose key is based on longs. |
OBStoreShort |
createOBStoreShort(String name,
OBStorageConfig config)
Creates an OBStoreShort whose key is based on shorts. |
BigInteger |
deSerializeBigInteger(byte[] value)
Creates a BigInteger of the given value. |
byte |
deSerializeByte(byte[] value)
Creates a byte of the given value. |
double |
deSerializeDouble(byte[] value)
Creates a double of the given value. |
float |
deSerializeFloat(byte[] value)
Creates a float of the given value. |
int |
deSerializeInt(byte[] value)
Creates a int of the given value. |
long |
deSerializeLong(byte[] value)
Creates a long of the given value. |
short |
deSerializeShort(byte[] value)
Creates a short of the given value. |
String |
getFactoryLocation()
Return the url where this factory is located. |
void |
removeOBStore(OBStore storage)
Removes all indexes and structures related to the given storage device. |
byte[] |
serializeBigInteger(BigInteger value)
Creates a binary representation of the given value. |
byte[] |
serializeByte(byte value)
Creates a binary representation of the given value. |
byte[] |
serializeDouble(double value)
Creates a binary representation of the given value. |
byte[] |
serializeFloat(float value)
Creates a binary representation of the given value. |
byte[] |
serializeInt(int value)
Creates a binary representation of the given value. |
byte[] |
serializeLong(long value)
Creates a binary representation of the given value. |
byte[] |
serializeShort(short value)
Creates a binary representation of the given value. |
Object |
stats()
Return a stats object that is to be printed |
Method Detail |
---|
OBStore<TupleBytes> createOBStore(String name, OBStorageConfig config) throws OBStorageException, OBException
temp
- If true, the database will be configured to be a temporal
database.name
- The name of the database.duplicates
- If duplicates are to be allowed.bulkMode
- If we want the storage to be faster for lots of insertions.
OBStorageException
- If the DB cannot be created.
OBException
void removeOBStore(OBStore storage) throws OBStorageException, OBException
storage
- The storage device to remove.
OBStorageException
- If something goes wrong with the delete operation.
OBException
OBStoreByte createOBStoreByte(String name, OBStorageConfig config) throws OBStorageException, OBException
name
- The name of the database.temp
- If true, the database will be configured to be a temporal
database.duplicates
- If duplicates are to be allowed.bulkMode
- If we want the storage to be faster for lots of insertions.
OBStorageException
- If the DB cannot be created.
OBException
byte[] serializeByte(byte value)
byte deSerializeByte(byte[] value)
OBStoreShort createOBStoreShort(String name, OBStorageConfig config) throws OBStorageException, OBException
name
- The name of the database.temp
- If true, the database will be configured to be a temporal
database.duplicates
- If duplicates are to be allowed.bulkMode
- If we want the storage to be faster for lots of insertions.
OBStorageException
- If the DB cannot be created.
OBException
byte[] serializeShort(short value)
short deSerializeShort(byte[] value)
OBStoreInt createOBStoreInt(String name, OBStorageConfig config) throws OBStorageException, OBException
name
- The name of the database.temp
- If true, the database will be configured to be a temporal
database.duplicates
- If duplicates are to be allowed.bulkMode
- If we want the storage to be faster for lots of insertions.
OBStorageException
- If the DB cannot be created.
OBException
byte[] serializeInt(int value)
int deSerializeInt(byte[] value)
OBStoreLong createOBStoreLong(String name, OBStorageConfig config) throws OBStorageException, OBException
name
- The name of the database.temp
- If true, the database will be configured to be a temporal
database.duplicates
- If duplicates are to be allowed.bulkMode
- If we want the storage to be faster for lots of insertions.
OBStorageException
- If the DB cannot be created.
OBException
byte[] serializeLong(long value)
long deSerializeLong(byte[] value)
OBStoreFloat createOBStoreFloat(String name, OBStorageConfig config) throws OBStorageException, OBException
name
- The name of the database.temp
- If true, the database will be configured to be a temporal
database.duplicates
- If duplicates are to be allowed.bulkMode
- If we want the storage to be faster for lots of insertions.
OBStorageException
- If the DB cannot be created.
OBException
byte[] serializeFloat(float value)
float deSerializeFloat(byte[] value)
OBStoreDouble createOBStoreDouble(String name, OBStorageConfig config) throws OBStorageException, OBException
name
- The name of the database.temp
- If true, the database will be configured to be a temporal
database.duplicates
- If duplicates are to be allowed.bulkMode
- If we want the storage to be faster for lots of insertions.
OBStorageException
- If the DB cannot be created.
OBException
byte[] serializeDouble(double value)
double deSerializeDouble(byte[] value)
byte[] serializeBigInteger(BigInteger value)
BigInteger deSerializeBigInteger(byte[] value)
void close() throws OBStorageException
OBStorageException
- if something goes wrong with the
underlying storage system.Object stats() throws OBStorageException
OBStorageException
- if something goes wrong with the
underlying storage system.String getFactoryLocation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |