public class BerkeleyDBStateManager extends CloseablePoolProvider<com.sleepycat.je.Environment,com.sleepycat.je.DatabaseException> implements StateManager, SerializedDurabilityListener
CLEAR_LOCAL_STATE
Constructor and Description |
---|
BerkeleyDBStateManager(DatabaseCluster<?,?> cluster,
File file,
com.sleepycat.je.EnvironmentConfig config,
PoolFactory poolFactory) |
Modifier and Type | Method and Description |
---|---|
void |
activated(DatabaseEvent event)
Triggered after database is successfully activated.
|
void |
afterInvocation(byte[] transactionId,
byte phase) |
void |
afterInvocation(InvocationEvent event) |
void |
afterInvoker(byte[] transactionId,
byte phase,
String databaseId,
byte[] result) |
void |
afterInvoker(InvokerEvent event) |
void |
beforeInvocation(byte[] transactionId,
byte phase,
byte exceptionType) |
void |
beforeInvocation(InvocationEvent event) |
void |
beforeInvoker(byte[] transactionId,
byte phase,
String databaseId) |
void |
beforeInvoker(InvokerEvent event) |
com.sleepycat.je.Environment |
create() |
void |
deactivated(DatabaseEvent event)
Triggered after database is successfully deactivated.
|
Set<String> |
getActiveDatabases() |
boolean |
isEnabled() |
boolean |
isValid(com.sleepycat.je.Environment environment) |
Map<InvocationEvent,Map<String,InvokerEvent>> |
recover() |
void |
setActiveDatabases(Set<String> databases) |
void |
start()
Called upon database cluster start.
|
void |
stop()
Called when database cluster is stopped.
|
close
getExceptionClass, getProvidedClass
public BerkeleyDBStateManager(DatabaseCluster<?,?> cluster, File file, com.sleepycat.je.EnvironmentConfig config, PoolFactory poolFactory)
public void start()
Lifecycle
public void stop()
Lifecycle
public Set<String> getActiveDatabases()
getActiveDatabases
in interface StateManager
public void setActiveDatabases(Set<String> databases)
setActiveDatabases
in interface StateManager
public void activated(DatabaseEvent event)
DatabaseClusterListener
activated
in interface DatabaseClusterListener
event
- indicates the database that was activatedpublic void deactivated(DatabaseEvent event)
DatabaseClusterListener
deactivated
in interface DatabaseClusterListener
event
- indicates the database that was deactivatedpublic void beforeInvocation(InvocationEvent event)
beforeInvocation
in interface DurabilityListener
public void afterInvocation(InvocationEvent event)
afterInvocation
in interface DurabilityListener
public void beforeInvoker(InvokerEvent event)
beforeInvoker
in interface DurabilityListener
public void afterInvoker(InvokerEvent event)
afterInvoker
in interface DurabilityListener
public void beforeInvocation(byte[] transactionId, byte phase, byte exceptionType)
beforeInvocation
in interface SerializedDurabilityListener
public void afterInvocation(byte[] transactionId, byte phase)
afterInvocation
in interface SerializedDurabilityListener
public void beforeInvoker(byte[] transactionId, byte phase, String databaseId)
beforeInvoker
in interface SerializedDurabilityListener
public void afterInvoker(byte[] transactionId, byte phase, String databaseId, byte[] result)
afterInvoker
in interface SerializedDurabilityListener
public Map<InvocationEvent,Map<String,InvokerEvent>> recover()
recover
in interface StateManager
public boolean isEnabled()
isEnabled
in interface StateManager
public com.sleepycat.je.Environment create() throws com.sleepycat.je.DatabaseException
create
in interface PoolProvider<com.sleepycat.je.Environment,com.sleepycat.je.DatabaseException>
com.sleepycat.je.DatabaseException
PoolProvider.create()
public boolean isValid(com.sleepycat.je.Environment environment)
isValid
in interface PoolProvider<com.sleepycat.je.Environment,com.sleepycat.je.DatabaseException>
PoolProvider.isValid(java.lang.Object)
Copyright © 2004–2014 Paul Ferraro. All rights reserved.