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 |
accountWithFallback(Record... records) |
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() |
protected File |
getOldFallbackFile()
Deprecated.
|
boolean |
isConnectionActive()
Check the Connection state
|
protected File |
moveFallbackFile(String suffix)
Move the fallbackFile to a new file with the same name by appending a suffix
|
protected void |
openConnection()
This method is used to open db connection
|
void |
prepareConnection(PersistenceBackendConfiguration configuration)
Prepare the connection to persistence.
|
protected void |
printLine(String line)
This method is synchronized on fallbackFile.
|
protected void |
reallyAccount(Record record)
This method contains the code to save the
Record |
account, accountValidateAggregate, flush, flush, getAggregationScheduler, getFallbackPersistence, setAggregationScheduler, setFallbackprotected FallbackPersistenceBackend(File fallbackFile)
protected File getFallbackFile()
@Deprecated protected File getOldFallbackFile()
protected File moveFallbackFile(String suffix)
suffix - 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 accountWithFallback(Record... records) throws Exception
accountWithFallback in class PersistenceBackendExceptionprotected void reallyAccount(Record record)
RecordreallyAccount in class PersistenceBackendprotected void printLine(String line) throws Exception
getFallbackFile() method.
This is intended for internal library usage only so that is protected.
ItExceptionprotected void closeConnection()
throws Exception
PersistenceBackendcloseConnection in class PersistenceBackendExceptionpublic boolean isConnectionActive()
throws Exception
PersistenceBackendisConnectionActive in class PersistenceBackendExceptionprotected void clean()
throws Exception
PersistenceBackendclean in class PersistenceBackendExceptionCopyright © 2020. All Rights Reserved.