public interface RebindManager
| Modifier and Type | Interface and Description |
|---|---|
static class |
RebindManager.RebindFailureMode |
| Modifier and Type | Method and Description |
|---|---|
void |
forcePersistNow()
Deprecated.
since 0.7.0; use
forcePersistNow(boolean, PersistenceExceptionHandler),
default parameter here is false to mean incremental, with null/default exception handler |
void |
forcePersistNow(boolean full,
PersistenceExceptionHandler exceptionHandler)
Forcibly performs persistence, in the foreground, either full (all entities) or incremental;
if no exception handler specified, the default one from the persister is used.
|
ChangeListener |
getChangeListener() |
java.util.Map<java.lang.String,java.lang.Object> |
getMetrics()
Metrics about rebind, last success, etc.
|
BrooklynMementoPersister |
getPersister() |
boolean |
isAwaitingInitialRebind()
Whether the management state has changed to a state where a rebind is needed
but we are still awaiting the first run;
ie state is master or hot, but list of apps is not yet accurate
|
java.util.List<Application> |
rebind()
Deprecated.
|
java.util.List<Application> |
rebind(java.lang.ClassLoader classLoader)
Deprecated.
|
java.util.List<Application> |
rebind(java.lang.ClassLoader classLoader,
RebindExceptionHandler exceptionHandler)
Deprecated.
|
java.util.List<Application> |
rebind(java.lang.ClassLoader classLoader,
RebindExceptionHandler exceptionHandler,
ManagementNodeState mode)
Causes this management context to rebind, loading data from the given backing store.
|
BrooklynMementoRawData |
retrieveMementoRawData() |
void |
setPersister(BrooklynMementoPersister persister) |
void |
setPersister(BrooklynMementoPersister persister,
PersistenceExceptionHandler exceptionHandler) |
void |
start()
Starts the appropriate background processes,
startPersistence() if ManagementNodeState.MASTER,
#startReadOnly() if ManagementNodeState.HOT_STANDBY or ManagementNodeState.HOT_BACKUP |
void |
startPersistence()
Starts the background persisting of state
(if persister is set; otherwise will start persisting as soon as persister is set).
|
void |
startReadOnly(ManagementNodeState mode)
Perform an initial load of state read-only and starts a background process
reading (mirroring) state periodically.
|
void |
stop()
Stops the appropriate background processes,
stopPersistence() or stopReadOnly(),
waiting for activity there to cease (interrupting in the case of stopReadOnly()). |
void |
stopPersistence()
Stops the background persistence of state.
|
void |
stopReadOnly()
Stops the background reading (mirroring) of state.
|
void |
waitForPendingComplete(Duration duration,
boolean canTrigger) |
void setPersister(BrooklynMementoPersister persister)
void setPersister(BrooklynMementoPersister persister, PersistenceExceptionHandler exceptionHandler)
BrooklynMementoPersister getPersister()
@Deprecated java.util.List<Application> rebind()
rebind(ClassLoader, RebindExceptionHandler, ManagementNodeState)@Deprecated java.util.List<Application> rebind(java.lang.ClassLoader classLoader)
rebind(ClassLoader, RebindExceptionHandler, ManagementNodeState)@Deprecated java.util.List<Application> rebind(java.lang.ClassLoader classLoader, RebindExceptionHandler exceptionHandler)
rebind(ClassLoader, RebindExceptionHandler, ManagementNodeState)@Beta java.util.List<Application> rebind(java.lang.ClassLoader classLoader, RebindExceptionHandler exceptionHandler, ManagementNodeState mode)
ManagementNodeState.MASTER
or periodically for a node in ManagementNodeState.HOT_STANDBY or ManagementNodeState.HOT_BACKUP.BrooklynMementoRawData retrieveMementoRawData()
ChangeListener getChangeListener()
void startPersistence()
void stopPersistence()
void startReadOnly(ManagementNodeState mode)
void stopReadOnly()
void start()
startPersistence() if ManagementNodeState.MASTER,
#startReadOnly() if ManagementNodeState.HOT_STANDBY or ManagementNodeState.HOT_BACKUPvoid stop()
stopPersistence() or stopReadOnly(),
waiting for activity there to cease (interrupting in the case of stopReadOnly()).void waitForPendingComplete(Duration duration, boolean canTrigger) throws java.lang.InterruptedException, java.util.concurrent.TimeoutException
java.lang.InterruptedExceptionjava.util.concurrent.TimeoutExceptionvoid forcePersistNow()
forcePersistNow(boolean, PersistenceExceptionHandler),
default parameter here is false to mean incremental, with null/default exception handlervoid forcePersistNow(boolean full,
@Nullable
PersistenceExceptionHandler exceptionHandler)
Note that full persistence does *not* delete items; incremental should normally be sufficient. (A clear then full persistence would have the same effect, but that is risky in a production setting if the process fails after the clear!)
boolean isAwaitingInitialRebind()
java.util.Map<java.lang.String,java.lang.Object> getMetrics()