|
Berkeley DB version 4.8.30 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sleepycat.persist.StoreConfig
public class StoreConfig
Configuration properties used with an EntityStore
or RawStore
.
StoreConfig
objects are thread-safe. Multiple threads may safely
call the methods of a shared StoreConfig
object.
See the package
summary example for an example of using a StoreConfig
.
Field Summary | |
---|---|
static StoreConfig |
DEFAULT
The default store configuration containing properties as if the configuration were constructed and not modified. |
Constructor Summary | |
---|---|
StoreConfig()
Creates an entity store configuration object with default properties. |
Method Summary | |
---|---|
StoreConfig |
clone()
Returns a shallow copy of the configuration. |
StoreConfig |
cloneConfig()
Deprecated. As of JE 4.0.13, replaced by clone() . |
boolean |
getAllowCreate()
Returns whether creation of a new store is allowed. |
DatabaseNamer |
getDatabaseNamer()
Returns the object reponsible for naming of files and databases. |
boolean |
getExclusiveCreate()
Returns whether opening an existing store is prohibited. |
EntityModel |
getModel()
Returns the entity model that defines entity classes and index keys. |
Mutations |
getMutations()
Returns the configured mutations for performing lazy evolution of stored instances. |
boolean |
getReadOnly()
Returns the read-only configuration property. |
boolean |
getSecondaryBulkLoad()
Returns the bulk-load-secondaries configuration property. |
boolean |
getTransactional()
Returns the transactional configuration property. |
void |
setAllowCreate(boolean allowCreate)
Specifies whether creation of a new store is allowed. |
void |
setDatabaseNamer(DatabaseNamer databaseNamer)
Specifies the object reponsible for naming of files and databases. |
void |
setExclusiveCreate(boolean exclusiveCreate)
Specifies whether opening an existing store is prohibited. |
void |
setModel(EntityModel model)
Sets the entity model that defines entity classes and index keys. |
void |
setMutations(Mutations mutations)
Configures mutations for performing lazy evolution of stored instances. |
void |
setReadOnly(boolean readOnly)
Sets the read-only configuration property. |
void |
setSecondaryBulkLoad(boolean secondaryBulkLoad)
Sets the bulk-load-secondaries configuration property. |
void |
setTransactional(boolean transactional)
Sets the transactional configuration property. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final StoreConfig DEFAULT
Constructor Detail |
---|
public StoreConfig()
Method Detail |
---|
public StoreConfig cloneConfig()
clone()
.
public StoreConfig clone()
clone
in class Object
public void setAllowCreate(boolean allowCreate)
If this property is false and the internal store metadata database
does not exist, DatabaseException
will be thrown when the store
is opened.
public boolean getAllowCreate()
public void setExclusiveCreate(boolean exclusiveCreate)
If this property is true and the internal store metadata database
already exists, DatabaseException
will be thrown when the store
is opened.
public boolean getExclusiveCreate()
public void setTransactional(boolean transactional)
This property is true to open all store indices for transactional access. True may not be specified if the environment is not also transactional.
public boolean getTransactional()
public void setReadOnly(boolean readOnly)
This property is true to open all store indices for read-only access, or false to open them for read-write access. False may not be specified if the environment is read-only.
public boolean getReadOnly()
public void setSecondaryBulkLoad(boolean secondaryBulkLoad)
This property is true to cause the initial creation of secondary
indices to be performed as a bulk load. If this property is true and
EntityStore.getSecondaryIndex
has
never been called for a secondary index, that secondary index will not
be created or written as records are written to the primary index. In
addition, if that secondary index defines a foreign key constraint, the
constraint will not be enforced.
The secondary index will be populated later when the {code getSecondaryIndex} method is called for the first time for that index, or when the store is closed and re-opened with this property set to false and the primary index is obtained. In either case, the secondary index is populated by reading through the entire primary index and adding records to the secondary index as needed. While populating the secondary, foreign key constraints will be enforced and an exception is thrown if a constraint is violated.
When loading a primary index along with secondary indexes from a large input data set, configuring a bulk load of the secondary indexes is sometimes more performant than updating the secondary indexes each time the primary index is updated. The absence of foreign key constraints during the load also provides more flexibility.
public boolean getSecondaryBulkLoad()
public void setModel(EntityModel model)
If null is specified or this method is not called, an AnnotationModel
instance is used by default.
public EntityModel getModel()
public void setMutations(Mutations mutations)
If null is specified and the store already exists, the previously specified mutations are used. The mutations are stored persistently in serialized form.
Mutations must be available to handle all changes to classes that are
incompatible with the class definitions known to this store. See Mutations
and Class Evolution
for
more information.
If an incompatible class change has been made and mutations are not
available for handling the change, IncompatibleClassException
will be thrown when creating an EntityStore
.
public Mutations getMutations()
public void setDatabaseNamer(DatabaseNamer databaseNamer)
DatabaseNamer.DEFAULT
.
NullPointerException
- if a null parameter value is passed.public DatabaseNamer getDatabaseNamer()
|
Berkeley DB version 4.8.30 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |