|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.persist.raw.RawStore
public class RawStore
Provides access to the raw data in a store for use by general purpose tools.
A RawStore
provides access to stored entities without using
entity classes or key classes. Keys are represented as simple type objects
or, for composite keys, as RawObject
instances, and entities are
represented as RawObject
instances.
RawStore
objects are thread-safe. Multiple threads may safely
call the methods of a shared RawStore
object.
When using a RawStore
, the current persistent class definitions
are not used. Instead, the previously stored metadata and class definitions
are used. This has several implications:
EntityModel
may not be specified using StoreConfig.setModel(com.sleepycat.persist.model.EntityModel)
. In other words, the configured model must be
null (the default).Comparable
interface must be present, in order to perform key
comparisons.
Constructor Summary | |
---|---|
RawStore(Environment env,
java.lang.String storeName,
StoreConfig config)
Opens an entity store for raw data access. |
Method Summary | |
---|---|
void |
close()
Closes all databases and sequences that were opened by this model. |
StoreConfig |
getConfig()
Returns a copy of the entity store configuration. |
Environment |
getEnvironment()
Returns the environment associated with this store. |
EntityModel |
getModel()
Returns the current entity model for this store. |
Mutations |
getMutations()
Returns the complete set of active mutations for this store, including mutations configured when this store was opened and those configured and stored previously. |
PrimaryIndex<java.lang.Object,RawObject> |
getPrimaryIndex(java.lang.String entityClass)
Opens the primary index for a given entity class. |
SecondaryIndex<java.lang.Object,java.lang.Object,RawObject> |
getSecondaryIndex(java.lang.String entityClass,
java.lang.String keyName)
Opens the secondary index for a given entity class and secondary key name. |
java.lang.String |
getStoreName()
Returns the name of this store. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RawStore(Environment env, java.lang.String storeName, StoreConfig config) throws DatabaseException
env
- an open Berkeley DB environment.storeName
- the name of the entity store within the given
environment.config
- the store configuration, or null to use default
configuration properties.
IncompatibleClassException
- if an incompatible class change has
been made and mutations are not configured for handling the change. See
Mutations
for more information.
java.lang.IllegalArgumentException
- if the Environment
is
read-only and the config ReadOnly
property is false.
DatabaseException
Method Detail |
---|
public PrimaryIndex<java.lang.Object,RawObject> getPrimaryIndex(java.lang.String entityClass) throws DatabaseException
DatabaseException
public SecondaryIndex<java.lang.Object,java.lang.Object,RawObject> getSecondaryIndex(java.lang.String entityClass, java.lang.String keyName) throws DatabaseException
DatabaseException
public Environment getEnvironment()
public StoreConfig getConfig()
public java.lang.String getStoreName()
public EntityModel getModel()
public Mutations getMutations()
public void close() throws DatabaseException
DatabaseException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |