Class FallbackMonitor
java.lang.Object
org.gcube.documentstore.persistence.FallbackMonitor
- All Implemented Interfaces:
Runnable
This class is used as scheduled thread to check if some records
where persisted in fallback file to retry
to persist them with the discovered PersistenceBackend
- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intprotected final PersistenceBackendstatic final TimeUnit -
Constructor Summary
ConstructorsConstructorDescriptionFallbackMonitor(PersistenceBackend persistenceBackend) Creates the monitor of the given persistence backend; it elaborates the fallback file only once started (start()).FallbackMonitor(PersistenceBackend persistenceBackend, boolean schedule) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidelaborateFallbackFile(File elaborationFile) protected voidelaborateFile(File elaborationFile) protected voidDeprecated.voidrun()Elaborates the fallback file with the library's credentials (LibraryCredentials).voidstart()Schedules the periodic elaboration of the fallback file.
-
Field Details
-
persistenceBackend
-
INITIAL_DELAY
public static final int INITIAL_DELAY- See Also:
-
DELAY
public static final int DELAY- See Also:
-
TIME_UNIT
-
-
Constructor Details
-
FallbackMonitor
Creates the monitor of the given persistence backend; it elaborates the fallback file only once started (start()).- Parameters:
persistenceBackend- the persistence backend whose fallback file is elaborated
-
FallbackMonitor
Deprecated.Creates the monitor and, if requested, starts it.- Parameters:
persistenceBackend- the persistence backend whose fallback file is elaboratedschedule- whether to start the monitor
-
-
Method Details
-
start
public void start()Schedules the periodic elaboration of the fallback file. -
elaborateFile
-
manageOldAccountingFile
Deprecated. -
elaborateFallbackFile
-
elaborateFallbackFile
protected void elaborateFallbackFile() -
run
public void run()Elaborates the fallback file with the library's credentials (LibraryCredentials).
-
FallbackMonitor(PersistenceBackend)andstart()