public static class EngineWrapper.CloseOnJVMShutdown extends EngineWrapper
Runtime.addShutdownHook(Thread)
If engine was closed by user before JVM shutdown, hook is removed to save memory.EngineWrapper.CloseOnJVMShutdown, EngineWrapper.ImmutabilityCheckEngine, EngineWrapper.ReadOnlyEngine, EngineWrapper.SerializerCheckEngineWrapper, EngineWrapper.SynchronizedEngineWrapper
Modifier and Type | Field and Description |
---|---|
protected AtomicBoolean |
shutdownHappened |
CLOSED
CATALOG_RECID, CHECK_RECORD, CLASS_INFO_RECID, LAST_RESERVED_RECID
Constructor and Description |
---|
EngineWrapper.CloseOnJVMShutdown(Engine engine) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close store/cache.
|
canRollback, canSnapshot, checkClosed, clearCache, closeListenerRegister, closeListenerUnregister, commit, compact, compareAndSwap, delete, get, getSerializerPojo, getWrappedEngine, isClosed, isReadOnly, preallocate, preallocate, put, rollback, snapshot, update
protected final AtomicBoolean shutdownHappened
public EngineWrapper.CloseOnJVMShutdown(Engine engine)
public void close()
Engine
NullPointerException
There is an configuration option DBMaker.closeOnJvmShutdown()
which uses shutdown hook to automatically
close Engine when JVM shutdowns.close
in interface Engine
close
in class EngineWrapper
Copyright © 2014. All Rights Reserved.