public final class Config4Impl extends java.lang.Object implements Configuration, DeepClone, MessageSender, FreespaceConfiguration, QueryConfiguration, ClientServerConfiguration
| Modifier and Type | Class and Description |
|---|---|
static class |
Config4Impl.ConfigDeepCloneContext |
| Modifier and Type | Field and Description |
|---|---|
static int |
PREFETCH_SLOT_CACHE_SIZE_FACTOR |
| Constructor and Description |
|---|
Config4Impl() |
| Modifier and Type | Method and Description |
|---|---|
int |
activationDepth()
gets the configured activation depth.
|
void |
activationDepth(int depth)
sets the activation depth to the specified value.
|
ActivationDepthProvider |
activationDepthProvider() |
void |
activationDepthProvider(ActivationDepthProvider provider) |
void |
add(ConfigurationItem item)
adds ConfigurationItems to be applied when
an ObjectContainer or ObjectServer is opened.
|
void |
addAlias(Alias alias)
adds a new Alias for a class, namespace or package.
|
boolean |
allowVersionUpdates() |
void |
allowVersionUpdates(boolean flag)
turns automatic database file format version updates on.
|
void |
applyConfigurationItems(InternalObjectContainer container) |
static void |
assertIsNotTainted(Configuration config) |
boolean |
asynchronousSync() |
void |
asynchronousSync(boolean flag) |
boolean |
automaticShutDown() |
void |
automaticShutDown(boolean flag)
turns automatic shutdown of the engine on and off.
|
boolean |
batchMessages() |
void |
batchMessages(boolean flag)
Configures to batch messages between client and server.
|
java.lang.String |
blobPath() |
byte |
blockSize() |
void |
blockSize(int bytes)
sets the storage data blocksize for new ObjectContainers.
|
void |
bTreeCacheHeight(int height)
configures caching of BTree nodes.
|
int |
bTreeNodeSize() |
void |
bTreeNodeSize(int size)
configures the size of BTree nodes in indexes.
|
CacheConfiguration |
cache()
returns the Cache configuration interface.
|
CallBackMode |
callbackMode() |
void |
callbackMode(CallBackMode mode) |
void |
callbacks(boolean turnOn)
turns callback methods on and off.
|
TernaryBool |
callConstructors() |
void |
callConstructors(boolean flag)
advises db4o to try instantiating objects with/without calling
constructors.
|
void |
classActivationDepthConfigurable(boolean turnOn)
turns
individual class activation depth configuration on
and off. |
ClientServerConfiguration |
clientServer()
returns client/server configuration interface.
|
LegacyClientServerFactory |
clientServerFactory() |
boolean |
commitRecoveryDisabled() |
Config4Class |
configClass(java.lang.String className) |
Iterator4 |
configurationItemsIterator()
Returns an iterator for all
ConfigurationItem instances
added. |
void |
container(ObjectContainerBase container) |
IdSystemFactory |
customIdSystemFactory() |
int |
databaseGrowthSize() |
void |
databaseGrowthSize(int bytes)
configures the size database files should grow in bytes, when no
free slot is found within.
|
java.lang.Object |
deepClone(java.lang.Object param)
The parameter allows passing one new object so parent
references can be corrected on children.
|
boolean |
detectSchemaChanges() |
void |
detectSchemaChanges(boolean flag)
tuning feature: configures whether db4o checks all persistent classes upon system
startup, for added or removed fields.
|
DiagnosticConfiguration |
diagnostic()
returns the configuration interface for diagnostics.
|
DiagnosticProcessor |
diagnosticProcessor() |
void |
disableCommitRecovery()
turns commit recovery off.
|
int |
discardFreeSpace() |
void |
discardSmallerThan(int byteCount)
tuning feature: configures the minimum size of free space slots in the database file
that are to be reused.
|
void |
encrypt(boolean flag)
Deprecated.
|
java.util.List |
environmentContributions() |
QueryEvaluationMode |
evaluationMode() |
void |
evaluationMode(QueryEvaluationMode mode)
configures the query processor evaluation mode.
|
Hashtable4 |
exceptionalClasses() |
boolean |
exceptionsOnNotStorable() |
void |
exceptionsOnNotStorable(boolean flag)
configures whether Exceptions are to be thrown, if objects can not be stored.
|
void |
factory(LegacyClientServerFactory factory) |
boolean |
fileBasedTransactionLog() |
void |
fileBasedTransactionLog(boolean flag) |
FreespaceConfiguration |
freespace()
returns the freespace configuration interface.
|
FreespaceFiller |
freespaceFiller() |
void |
freespaceFiller(FreespaceFiller freespaceFiller)
Configure a way to overwrite freed space in the database file with custom
(for example: random) bytes.
|
TernaryBool |
generateCommitTimestamps() |
void |
generateCommitTimestamps(boolean flag)
Configures db4o to generate commit timestamps for all stored objects.
All the objects commited within a transaction will share the same commit timestamp. |
ConfigScope |
generateUUIDs() |
void |
generateUUIDs(ConfigScope scope)
configures db4o to generate UUIDs for stored objects.
|
void |
generateVersionNumbers(ConfigScope scope)
Deprecated.
|
MessageSender |
getMessageSender()
returns the MessageSender for this Configuration context.
|
byte |
idSystemType() |
boolean |
internStrings()
returns true if strings will be interned.
|
void |
internStrings(boolean doIntern)
configures db4o to call #intern() on strings upon retrieval.
|
IoAdapter |
io()
returns the configured
IoAdapter. |
void |
io(IoAdapter adapter)
allows to configure db4o to use a customized byte IO adapter.
|
boolean |
isReadOnly() |
void |
lockDatabaseFile(boolean flag)
can be used to turn the database file locking thread off.
|
boolean |
lockFile() |
void |
markTransient(java.lang.String marker)
allows to mark fields as transient with custom attributes.
|
int |
maxBatchQueueSize() |
void |
maxBatchQueueSize(int maxSize)
Configures the maximum memory buffer size for batched message.
|
int |
maxStackDepth() |
void |
maxStackDepth(int maxStackDepth) |
int |
messageLevel() |
void |
messageLevel(int level)
sets the detail level of db4o messages.
|
MessageRecipient |
messageRecipient() |
NameProvider |
nameProvider() |
void |
nameProvider(NameProvider provider) |
ObjectClass |
objectClass(java.lang.Object clazz)
returns an
ObjectClass object
to configure the specified class. |
boolean |
optimizeNativeQueries()
indicates whether Native Queries will be optimized dynamically.
|
void |
optimizeNativeQueries(boolean optimizeNQ)
If set to true, db4o will try to optimize native queries
dynamically at query execution time, otherwise it will
run native queries in unoptimized mode as SODA evaluations.
|
java.io.PrintStream |
outStream() |
void |
password(java.lang.String pw)
Deprecated.
|
int |
prefetchDepth() |
void |
prefetchDepth(int prefetchDepth)
Sets the depth to which prefetched objects are activated.
|
int |
prefetchIDCount() |
void |
prefetchIDCount(int prefetchIDCount)
Sets the number of IDs to be pre-allocated in the database for new
objects created on the client.
|
int |
prefetchObjectCount() |
void |
prefetchObjectCount(int prefetchObjectCount)
Sets the number of objects to be prefetched for an ObjectSet.
|
Event4<EventArgs> |
prefetchSettingsChanged() |
int |
prefetchSlotCacheSize() |
void |
prefetchSlotCacheSize(int slotCacheSize)
Sets the slot cache size to the given value.
|
QueryConfiguration |
queries()
returns the Query configuration interface.
|
QueryResultIteratorFactory |
queryResultIteratorFactory() |
void |
queryResultIteratorFactory(QueryResultIteratorFactory factory) |
Hashtable4 |
readAs() |
void |
readOnly(boolean flag)
turns readOnly mode on and off.
|
boolean |
recoveryMode() |
void |
recoveryMode(boolean flag)
turns recovery mode on and off.
Recovery mode can be used to try to retrieve as much as possible out of an already corrupted database. |
ReferenceSystemFactory |
referenceSystemFactory() |
void |
referenceSystemFactory(ReferenceSystemFactory referenceSystemFactory) |
GenericReflector |
reflector() |
void |
reflectWith(Reflector reflect)
configures the use of a specially designed reflection implementation.
|
void |
refreshClasses() |
void |
registerTypeHandler(TypeHandlerPredicate predicate,
TypeHandler4 typeHandler)
allows registering special TypeHandlers for customized marshalling
and customized comparisons.
|
void |
removeAlias(Alias alias)
Removes an alias previously added with
Configuration.addAlias(Alias). |
int |
reservedStorageSpace() |
void |
reserveStorageSpace(long byteCount)
tuning feature only: reserves a number of bytes in database files.
|
java.lang.String |
resolveAliasRuntimeName(java.lang.String runtimeType) |
java.lang.String |
resolveAliasStoredName(java.lang.String storedType) |
void |
send(java.lang.Object obj)
The ConfigImpl also is our messageSender
|
void |
setBlobPath(java.lang.String path)
configures the path to be used to store and read
Blob data.
|
void |
setMessageRecipient(MessageRecipient messageRecipient)
sets the MessageRecipient to receive Client Server messages.
|
void |
setOut(java.io.PrintStream outStream)
Deprecated.
|
boolean |
singleThreadedClient() |
void |
singleThreadedClient(boolean flag)
configures the client messaging system to be single threaded
or multithreaded.
|
Storage |
storage()
returns the configured
Storage |
void |
storage(Storage factory)
allows to configure db4o to use a customized byte IO storage mechanism.
|
StringEncoding |
stringEncoding() |
void |
stringEncoding(StringEncoding encoding)
configures the string encoding to be used.
|
void |
taint() |
boolean |
testConstructors() |
void |
testConstructors(boolean flag)
tuning feature: configures whether db4o should try to instantiate one instance
of each persistent class on system startup.
|
int |
timeoutClientSocket() |
void |
timeoutClientSocket(int milliseconds)
configures the time a client waits for a message response
from the server.
|
int |
timeoutServerSocket() |
void |
timeoutServerSocket(int milliseconds)
configures the timeout of the serverside socket.
|
TypeHandler4 |
typeHandlerForClass(ReflectClass classReflector,
byte handlerVersion) |
int |
updateDepth() |
void |
updateDepth(int depth)
specifies the global updateDepth.
|
UpdateDepthProvider |
updateDepthProvider() |
void |
updateDepthProvider(UpdateDepthProvider provider) |
void |
useBTreeSystem()
configures db4o to use a BTree-based freespace system.
|
void |
useCustomIdSystem(IdSystemFactory factory) |
void |
useIndexSystem()
Deprecated.
|
void |
useInMemoryIdSystem() |
void |
usePointerBasedIdSystem() |
void |
useRamSystem()
configures db4o to use a RAM-based freespace system.
|
void |
useSingleBTreeIdSystem() |
void |
useStackedBTreeIdSystem() |
int |
weakReferenceCollectionInterval() |
void |
weakReferenceCollectionInterval(int milliseconds)
configures the timer for WeakReference collection.
|
boolean |
weakReferences() |
void |
weakReferences(boolean flag)
turns weak reference management on or off.
|
public static final int PREFETCH_SLOT_CACHE_SIZE_FACTOR
public int activationDepth()
ConfigurationactivationDepth in interface Configurationpublic void activationDepth(int depth)
ConfigurationObjectSet of a query result, the result objects
will be activated to the configured activation depth.// Object foo is the result of a query, it is delivered by the ObjectSet Object foo = objectSet.next();foo.member1.member2.member3.member4.member5 will be a valid object
ObjectContainer.activate(Object, int).
ObjectContainer.deactivate(Object, int)
can be used to manually free memory by deactivating objects.activationDepth in interface Configurationdepth - the desired global activation depth.configuring classes individuallypublic void add(ConfigurationItem item)
Configurationadd in interface Configurationitem - the ConfigurationItempublic Iterator4 configurationItemsIterator()
ConfigurationItem instances
added.add(com.db4o.config.ConfigurationItem)public void allowVersionUpdates(boolean flag)
ConfigurationallowVersionUpdates in interface Configurationpublic void applyConfigurationItems(InternalObjectContainer container)
public void automaticShutDown(boolean flag)
Configurationtrue.automaticShutDown in interface Configurationflag - whether db4o should shut down automatically.public void blockSize(int bytes)
ConfigurationblockSize in interface Configurationbytes - the size in bytes from 1 to 127public void bTreeNodeSize(int size)
ConfigurationbTreeNodeSize in interface Configurationsize - the number of elements held in one BTree node.public void bTreeCacheHeight(int height)
ConfigurationbTreeCacheHeight in interface Configurationheight - the height of the cache from the rootpublic void callbacks(boolean turnOn)
Configurationcallbacks in interface ConfigurationturnOn - false to turn callback methods offUsing callbackspublic void callbackMode(CallBackMode mode)
public void callConstructors(boolean flag)
ConfigurationObjectClass.callConstructor(boolean).
callConstructors in interface Configurationflag - - specify true, to request calling constructors, specify
false to request not calling constructors.ObjectClass.callConstructor(boolean)public void classActivationDepthConfigurable(boolean turnOn)
Configurationindividual class activation depth configuration on
and off.
classActivationDepthConfigurable in interface ConfigurationturnOn - false to turn the possibility to individually configure class
activation depths offWhy activation?public Config4Class configClass(java.lang.String className)
public java.lang.Object deepClone(java.lang.Object param)
DeepClonepublic void container(ObjectContainerBase container)
public void databaseGrowthSize(int bytes)
ConfigurationdatabaseGrowthSize in interface Configurationbytes - amount of bytespublic int databaseGrowthSize()
public void detectSchemaChanges(boolean flag)
ConfigurationtruedetectSchemaChanges in interface Configurationflag - the desired settingpublic void disableCommitRecovery()
ConfigurationdisableCommitRecovery in interface Configurationpublic void discardSmallerThan(int byteCount)
FreespaceConfigurationInteger.MAX_VALUE to this method to discard all free slots for
the best possible startup time.0 all space is reuseddiscardSmallerThan in interface FreespaceConfigurationbyteCount - Slots with this size or smaller will be lost.public void encrypt(boolean flag)
ConfigurationDb4o.openFile(java.lang.String).
encrypt in interface Configurationflag - true for turning encryption on, false for turning encryption
off.Configuration.password(java.lang.String)public void exceptionsOnNotStorable(boolean flag)
ConfigurationObjectNotStorableException
if an object can not be stored.
exceptionsOnNotStorable in interface Configurationflag - false to not throw Exceptions if objects can not be stored (fail silently).public FreespaceConfiguration freespace()
Configurationfreespace in interface Configurationpublic void freespaceFiller(FreespaceFiller freespaceFiller)
FreespaceConfigurationfreespaceFiller in interface FreespaceConfigurationfreespaceFiller - The freespace overwriting callback to usepublic FreespaceFiller freespaceFiller()
public void generateUUIDs(ConfigScope scope)
ConfigurationgenerateUUIDs in interface Configurationscope - the scope for UUID generation: disabled, generate for all classes, or configure individually@Deprecated public void generateVersionNumbers(ConfigScope scope)
ConfigurationgenerateVersionNumbers in interface Configurationscope - the scope for version number generation: disabled, generate for all classes, or configure individuallypublic void generateCommitTimestamps(boolean flag)
ConfigurationObjectContainer container = ...; ObjectInfo objectInfo = container.ext().getObjectInfo(obj); long commitTimestamp = objectInfo.getVersion();
generateCommitTimestamps in interface Configurationflag - if true, commit timetamps will be generated for all stored
objects. If you already have commit timestamps for stored
objects and later set this flag to false, although you wont be
able to access them, the commit timestamps will still be taking
space in your file container. The only way to free that space
is defragmenting the container.public MessageSender getMessageSender()
ClientServerConfigurationgetMessageSender in interface ClientServerConfigurationpublic void internStrings(boolean doIntern)
ConfigurationinternStrings in interface ConfigurationdoIntern - true to intern stringspublic void io(IoAdapter adapter)
ConfigurationIoAdapter to
write your own. Possible usecases could be improved performance
with a native library, mirrored write to two files, encryption or
read-on-write fail-safety control.io in interface Configurationadapter - - the IoAdapterpublic void lockDatabaseFile(boolean flag)
Configurationtrue.lockDatabaseFile in interface Configurationflag - false to turn database file locking off.public void markTransient(java.lang.String marker)
ConfigurationmarkTransient in interface Configurationmarker - - the fully qualified name of the attribute, including
it's namespacepublic void messageLevel(int level)
ConfigurationPrintStream.
messageLevel in interface Configurationlevel - integer from 0 to 3Configuration.setOut(java.io.PrintStream)public void optimizeNativeQueries(boolean optimizeNQ)
Configurationtrue.optimizeNativeQueries in interface ConfigurationoptimizeNQ - true, if db4o should try to optimize
native queries at query execution time, false otherwisepublic boolean optimizeNativeQueries()
ConfigurationoptimizeNativeQueries in interface ConfigurationConfiguration.optimizeNativeQueries(boolean)public ObjectClass objectClass(java.lang.Object clazz)
ConfigurationObjectClass object
to configure the specified class.
objectClass in interface Configurationclazz - class name, Class object, or example object.ObjectClass
object for configuration.public java.io.PrintStream outStream()
public void password(java.lang.String pw)
ConfigurationDb4o.openFile(java.lang.String).
password in interface Configurationpw - the password to be used.public void readOnly(boolean flag)
ConfigurationDb4o.openFile() will open files.
readOnly in interface Configurationflag - true for configuring readOnly mode for subsequent
calls to Db4o.openFile().public GenericReflector reflector()
public void reflectWith(Reflector reflect)
ConfigurationreflectWith in interface Configurationpublic void refreshClasses()
public void reserveStorageSpace(long byteCount)
throws DatabaseReadOnlyException
ConfigurationExtObjectContainer.configure()) will
continually allocate space.
reserveStorageSpace in interface ConfigurationbyteCount - the number of bytes to reserveDatabaseReadOnlyExceptionpublic void send(java.lang.Object obj)
send in interface MessageSenderobj - the message parameter, any object may be used.public void setBlobPath(java.lang.String path)
throws java.io.IOException
ConfigurationsetBlobPath in interface Configurationpath - the path to be usedjava.io.IOExceptionpublic void setMessageRecipient(MessageRecipient messageRecipient)
ClientServerConfigurationsetMessageRecipient in interface ClientServerConfigurationmessageRecipient - the MessageRecipient to be usedpublic void setOut(java.io.PrintStream outStream)
ConfigurationPrintStream where db4o is to print its event messages.
Configuration.messageLevel(int)
to produce more detailed messages.
setOut(System.out) to print messages to the
console.Configuration.messageLevel(int) is used.setOut in interface ConfigurationoutStream - the new PrintStream for messages.Configuration.messageLevel(int)public void singleThreadedClient(boolean flag)
ClientServerConfigurationtrue for low resource systems.false for best asynchronous performance and fast
GUI response.
truefalsesingleThreadedClient in interface ClientServerConfigurationflag - the desired settingpublic StringEncoding stringEncoding()
public void stringEncoding(StringEncoding encoding)
ConfigurationDb4o.openFile(java.lang.String) or Db4o.openServer(java.lang.String, int).
config.stringEncoding(StringEncodings.utf8()));stringEncoding in interface ConfigurationStringEncodingspublic void testConstructors(boolean flag)
Configurationfalse,
if all persistent classes have public default constructors.
truetestConstructors in interface Configurationflag - the desired settingpublic void timeoutClientSocket(int milliseconds)
ClientServerConfigurationClientServerConfiguration.timeoutClientSocket(int)
and ClientServerConfiguration.timeoutServerSocket(int).
timeoutClientSocket in interface ClientServerConfigurationmilliseconds - time in millisecondspublic void timeoutServerSocket(int milliseconds)
ClientServerConfigurationClientServerConfiguration.timeoutClientSocket(int)
and ClientServerConfiguration.timeoutServerSocket(int).
timeoutServerSocket in interface ClientServerConfigurationmilliseconds - time in millisecondspublic void updateDepth(int depth)
Configurationcom.db4o.ObjectContainer#set
for further details.com.db4o.ObjectContainer#set
will be updated.updateDepth in interface Configurationdepth - the depth of the desired update.ObjectClass.updateDepth(int),
ObjectClass.cascadeOnUpdate(boolean),
Using callbackspublic void useBTreeSystem()
FreespaceConfigurationuseBTreeSystem in interface FreespaceConfigurationpublic void useRamSystem()
FreespaceConfigurationuseRamSystem in interface FreespaceConfigurationpublic void useIndexSystem()
FreespaceConfigurationuseIndexSystem in interface FreespaceConfigurationpublic void weakReferenceCollectionInterval(int milliseconds)
ConfigurationweakReferenceCollectionInterval in interface Configurationmilliseconds - the time in millisecondspublic void weakReferences(boolean flag)
ConfigurationExtObjectContainer.purge(java.lang.Object)
false causes db4o to use hard
references to objects, preventing the garbage collection process
from disposing of unused objects.
true.weakReferences in interface Configurationpublic void addAlias(Alias alias)
ConfigurationTypeAlias provides an #equals() resolver to match
names directly.WildcardAlias allows simple pattern matching
with one single '*' wildcard character.Alias constructs by creating own resolvers
that implement the Alias interface.
EmbeddedConfiguration config = Db4oEmbedded.newConfiguration();
// Creating an Alias for a single class
config.common().addAlias(
new TypeAlias("com.f1.Pilot", "com.f1.Driver"));
// Mapping a Java package onto another
config.common().addAlias(
new WildcardAlias(
"com.f1.*",
"com.f1.client*"));
addAlias in interface Configurationpublic void removeAlias(Alias alias)
ConfigurationConfiguration.addAlias(Alias).removeAlias in interface Configurationalias - the alias to removepublic java.lang.String resolveAliasRuntimeName(java.lang.String runtimeType)
public java.lang.String resolveAliasStoredName(java.lang.String storedType)
public boolean allowVersionUpdates()
public boolean automaticShutDown()
public byte blockSize()
public int bTreeNodeSize()
public java.lang.String blobPath()
public CallBackMode callbackMode()
public TernaryBool callConstructors()
public boolean detectSchemaChanges()
public boolean commitRecoveryDisabled()
public DiagnosticConfiguration diagnostic()
Configurationdiagnostic in interface Configurationpublic DiagnosticProcessor diagnosticProcessor()
public int discardFreeSpace()
public Hashtable4 exceptionalClasses()
public boolean exceptionsOnNotStorable()
public ConfigScope generateUUIDs()
public TernaryBool generateCommitTimestamps()
public boolean internStrings()
ConfigurationinternStrings in interface Configurationpublic boolean lockFile()
public int messageLevel()
public MessageRecipient messageRecipient()
public void prefetchIDCount(int prefetchIDCount)
ClientServerConfigurationprefetchIDCount in interface ClientServerConfigurationprefetchIDCount - The number of IDs to be prefetchedpublic int prefetchIDCount()
public void prefetchObjectCount(int prefetchObjectCount)
ClientServerConfigurationprefetchObjectCount in interface ClientServerConfigurationprefetchObjectCount - The number of objects to be prefetchedpublic int prefetchObjectCount()
public Hashtable4 readAs()
public boolean isReadOnly()
public void recoveryMode(boolean flag)
ConfigurationrecoveryMode in interface Configurationflag - true to turn recover mode on.public boolean recoveryMode()
public int reservedStorageSpace()
public boolean singleThreadedClient()
public boolean testConstructors()
public int timeoutClientSocket()
public int timeoutServerSocket()
public int updateDepth()
public int weakReferenceCollectionInterval()
public boolean weakReferences()
public IoAdapter io()
ConfigurationIoAdapter.io in interface Configurationpublic Storage storage()
ConfigurationStoragestorage in interface Configurationpublic void storage(Storage factory)
ConfigurationStorage to
write your own. Possible usecases could be improved performance
with a native library, mirrored write to two files, encryption or
read-on-write fail-safety control.storage in interface Configurationfactory - - the factoryCachingStorage,
MemoryStorage,
FileStorage,
StorageDecoratorpublic QueryConfiguration queries()
Configurationqueries in interface Configurationpublic void evaluationMode(QueryEvaluationMode mode)
QueryConfigurationQuery.execute()
is called. The complete ObjectSet of all matching IDs is
generated immediately.Query.execute() call will trigger all index
processing immediately. A snapshot of the current state of all relevant indexes
is taken for further processing by the SODA query processor. All non-indexed
constraints and all evaluations will be run when the user application iterates
through the resulting ObjectSet.Query.execute() call will only create an Iterator
against the best index found. Further query processing (including all index
processing) will happen when the user application iterates through the resulting
ObjectSet.ObjectSet,
this mode will be slightly faster than the others.Query.execute() will return very fast. First results can be
made available to the application before the query is fully processed.ObjectSet.
In doing so the query processor takes changes into account that may have happened
since the Query#execute()call: committed changes from other transactions, and
uncommitted changes from the calling transaction. There is a wide range
of possible side effects. The underlying index may have changed. Objects themselves
may have changed in the meanwhile. There even is the chance of creating an endless
loop, if the caller of the iterates through the ObjectSet and changes each
object in a way that it is placed at the end of the index: The same objects can be
revisited over and over. In lazy mode it can make sense to work in a way one would
work with collections to avoid concurrent modification exceptions. For instance one
could iterate through the ObjectSet first and store all objects to a temporary
other collection representation before changing objects and storing them back to db4o.ObjectSet will require the query
processor to create a snapshot or to evaluate the query fully. An example of such
a call is ObjectSet.size().
QueryEvaluationMode
constants from the QueryEvaluationMode class to this method:QueryEvaluationMode.IMMEDIATEQueryEvaluationMode.SNAPSHOTQueryEvaluationMode.LAZYevaluationMode in interface QueryConfigurationpublic QueryEvaluationMode evaluationMode()
evaluationMode in interface QueryConfigurationQueryConfiguration.evaluationMode(QueryEvaluationMode)public void queryResultIteratorFactory(QueryResultIteratorFactory factory)
public QueryResultIteratorFactory queryResultIteratorFactory()
public ClientServerConfiguration clientServer()
ConfigurationclientServer in interface Configurationpublic void batchMessages(boolean flag)
ClientServerConfigurationbatchMessages in interface ClientServerConfigurationflag - false, to turn message batching off.public boolean batchMessages()
public void maxBatchQueueSize(int maxSize)
ClientServerConfigurationmaxSize, batched
messages will be sent to server.maxBatchQueueSize in interface ClientServerConfigurationpublic int maxBatchQueueSize()
public void activationDepthProvider(ActivationDepthProvider provider)
public void updateDepthProvider(UpdateDepthProvider provider)
public ActivationDepthProvider activationDepthProvider()
public UpdateDepthProvider updateDepthProvider()
public void registerTypeHandler(TypeHandlerPredicate predicate, TypeHandler4 typeHandler)
ConfigurationregisterTypeHandler in interface Configurationpredicate - to specify for which classes and versions the
TypeHandler is to be used.typeHandler - to be used for the classes that match the predicate.public TypeHandler4 typeHandlerForClass(ReflectClass classReflector, byte handlerVersion)
public void factory(LegacyClientServerFactory factory)
public LegacyClientServerFactory clientServerFactory()
public CacheConfiguration cache()
Configurationcache in interface Configurationpublic boolean fileBasedTransactionLog()
public void fileBasedTransactionLog(boolean flag)
public void taint()
public static void assertIsNotTainted(Configuration config)
public void prefetchDepth(int prefetchDepth)
ClientServerConfigurationprefetchDepth in interface ClientServerConfigurationpublic int prefetchDepth()
public java.util.List environmentContributions()
public void prefetchSlotCacheSize(int slotCacheSize)
ClientServerConfigurationprefetchSlotCacheSize in interface ClientServerConfigurationpublic int prefetchSlotCacheSize()
public void referenceSystemFactory(ReferenceSystemFactory referenceSystemFactory)
public ReferenceSystemFactory referenceSystemFactory()
public void nameProvider(NameProvider provider)
public NameProvider nameProvider()
public void usePointerBasedIdSystem()
public void useStackedBTreeIdSystem()
public void useSingleBTreeIdSystem()
public byte idSystemType()
public void useInMemoryIdSystem()
public void useCustomIdSystem(IdSystemFactory factory)
public IdSystemFactory customIdSystemFactory()
public void asynchronousSync(boolean flag)
public boolean asynchronousSync()
public int maxStackDepth()
maxStackDepth in interface ConfigurationCommonConfiguration.maxStackDepth()public void maxStackDepth(int maxStackDepth)
maxStackDepth in interface ConfigurationCommonConfiguration.maxStackDepth(int)