public class PersistentDomain extends java.lang.Object implements ManagedQueue.OnRemoveCallback<Task>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
KEY_TASKCOMMITTED |
Constructor and Description |
---|
PersistentDomain(org.resoa.service.DomainDescriptor domDesc,
PersistenceConfig persistenceConfig,
Persistor persistor)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
backup(Persistor persistor,
boolean enforce)
create hot backup of domain
|
void |
checkForJournal(Task task)
Create Journal file of LOGIFLEPERSIST status.
|
void |
closePersistence()
We mark as not persistent
|
org.resoa.util.SymCipher |
getAes() |
CacheManager |
getCacheManager() |
java.lang.ClassLoader |
getClassLoader() |
java.lang.String |
getDatabaseDir() |
DatabaseTransition |
getDbTransition() |
java.lang.String |
getDomain() |
org.resoa.service.DomainDescriptor |
getDomainDescriptor() |
ExecutionLogManager |
getExecutionLogManager() |
java.lang.String |
getJournalDir() |
LockManager |
getLockManager() |
long |
getNextBackupTime() |
PersistenceConfig |
getPersistConfig() |
org.resoa.topology.PersistentDomainConfig |
getPersistDomainConfig() |
PersistenceMode |
getPersistenceMode()
Returns the Persistence mode
|
Persistor |
getPersistor() |
TransactionLogger |
getTransactionLogger() |
boolean |
isMaster() |
boolean |
isSlave() |
boolean |
isSynchronizing() |
void |
onRemove(Task task) |
void |
queueTask(Task task)
Queue a task for SLAVE execution
|
void |
setDbTransition(DatabaseTransition dbTransition) |
void |
setMode(PersistenceMode mode)
Change the Persistence Runtime mode
If set to SLAVE, the execution log will be requested from domain MASTER node,
if set to MASTER, outstanding task journals will be processed into storage.
|
void |
setTransactionLogger(TransactionLogger transactionLogger) |
void |
signalSyncComplete()
Signal synchronization complete
|
int |
waitForSync()
Wait for Slave synchronization
|
public PersistentDomain(org.resoa.service.DomainDescriptor domDesc, PersistenceConfig persistenceConfig, Persistor persistor) throws org.resoa.exception.PersistenceException
domDesc
- persistenceConfig
- persistor
- org.resoa.exception.PersistenceException
public org.resoa.util.SymCipher getAes()
public java.lang.ClassLoader getClassLoader()
public void setTransactionLogger(TransactionLogger transactionLogger)
transactionLogger
- the transactionLogger to setpublic TransactionLogger getTransactionLogger()
public Persistor getPersistor()
public org.resoa.service.DomainDescriptor getDomainDescriptor()
public org.resoa.topology.PersistentDomainConfig getPersistDomainConfig()
public DatabaseTransition getDbTransition()
public void setDbTransition(DatabaseTransition dbTransition) throws org.resoa.exception.PersistenceException
dbTransition
- the dbTransition to setorg.resoa.exception.PersistenceException
public LockManager getLockManager()
public CacheManager getCacheManager()
public java.lang.String getDatabaseDir()
public java.lang.String getJournalDir()
public ExecutionLogManager getExecutionLogManager()
public PersistenceConfig getPersistConfig()
public PersistenceMode getPersistenceMode()
public boolean isMaster()
public boolean isSlave()
public boolean isSynchronizing()
public int waitForSync()
public void signalSyncComplete()
public long getNextBackupTime()
public void backup(Persistor persistor, boolean enforce) throws StorageException
persistor
- enforce
- if false, the backup will only run if BackupInfo information indicates backup requirementStorageException
public void closePersistence()
public void queueTask(Task task) throws org.resoa.exception.PersistenceException
task
- org.resoa.exception.PersistenceException
public void checkForJournal(Task task)
task
- the taskpublic void setMode(PersistenceMode mode)
mode
- the mode to setpublic java.lang.String getDomain()
public void onRemove(Task task)
onRemove
in interface ManagedQueue.OnRemoveCallback<Task>
Copyright © 2005-2014 The Resoa Project, resoa.org.