public class FallbackPersistenceBackend extends PersistenceBackend
aggregationScheduler, fallbackPersistence, fallbackUseCounter, fallbackUseStartTime, forceFallbackUse, MAX_FALLBACK_RETRY, MAX_TIME_TO_FALLBACK, persistenceBackendMonitor| Modifier | Constructor and Description |
|---|---|
protected |
FallbackPersistenceBackend(File fallbackFile) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
clean()
This method is used to allow PersistenceBackend implementations
to clean a global status if any (or to renew it) when to much
exceptions occurs trying to persist Records.
|
void |
close()
This method is used to close
|
protected void |
closeConnection()
This method is used to close db connection
|
protected File |
getFallbackFile() |
boolean |
isConnectionActive()
Check the Connection state
|
protected void |
openConnection()
This method is used to open db connection
|
void |
prepareConnection(PersistenceBackendConfiguration configuration)
Prepare the connection to persistence.
|
void |
printLine(String line) |
protected void |
reallyAccount(Record record)
This method contains the code to save the
Record |
account, accountValidateAggregate, accountWithFallback, flush, flush, getAggregationScheduler, getFallbackPersistence, setAggregationScheduler, setFallbackprotected FallbackPersistenceBackend(File fallbackFile)
protected File getFallbackFile()
public void prepareConnection(PersistenceBackendConfiguration configuration)
prepareConnection in class PersistenceBackendconfiguration - The configuration to create the connectionprotected void openConnection()
throws Exception
PersistenceBackendopenConnection in class PersistenceBackendExceptionpublic void close()
throws Exception
close in class PersistenceBackendExceptionprotected void reallyAccount(Record record) throws Exception
Record
This method is synchronized on File used, so any actions which
has to modify, rename or delete the file must be synchronized on this
file. To retrieve it use getFallbackFile() method.
This is intended for internal library usage only so that is protectedreallyAccount in class PersistenceBackendExceptionprotected void closeConnection()
throws Exception
PersistenceBackendcloseConnection in class PersistenceBackendExceptionpublic boolean isConnectionActive()
throws Exception
PersistenceBackendisConnectionActive in class PersistenceBackendExceptionprotected void clean()
throws Exception
PersistenceBackendclean in class PersistenceBackendExceptionCopyright © 2017. All Rights Reserved.