@Beta public class ManagementPlaneSyncRecordPersisterToObjectStore extends java.lang.Object implements ManagementPlaneSyncRecordPersister
plane/
- top-level directory
master
- contains the id of the management-node that is currently master
change.log
- log of changes made
nodes/
- sub-directory, containing one file per management-node
a9WiuVKp
- file named after the management-node's id, containing the management node's current state
E1eDXQF3
ManagementPlaneSyncRecordPersister.Delta
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NODES_SUB_PATH |
Constructor and Description |
---|
ManagementPlaneSyncRecordPersisterToObjectStore(ManagementContext mgmt,
PersistenceObjectStore objectStore,
java.lang.ClassLoader classLoader) |
Modifier and Type | Method and Description |
---|---|
void |
checkpoint(ManagementPlaneSyncRecord record) |
void |
delta(ManagementPlaneSyncRecordPersister.Delta delta) |
ManagementPlaneSyncRecord |
loadSyncRecord()
Analogue to
BrooklynMementoPersister#loadMemento(brooklyn.mementos.BrooklynMementoPersister.LookupContext) |
void |
preferRemoteTimestampInMemento() |
void |
stop() |
void |
waitForWritesCompleted(Duration timeout) |
public static final java.lang.String NODES_SUB_PATH
public ManagementPlaneSyncRecordPersisterToObjectStore(ManagementContext mgmt, PersistenceObjectStore objectStore, java.lang.ClassLoader classLoader)
mgmt
- not used much at present but handy to ensure we know it so that obj store is preparedobjectStore
- the objectStore use to read/write management-plane data;
this must have been PersistenceObjectStore.prepareForSharedUse(brooklyn.entity.rebind.persister.PersistMode, HighAvailabilityMode)
classLoader
- ClassLoader to use when deserializing datapublic void preferRemoteTimestampInMemento()
public void stop()
stop
in interface ManagementPlaneSyncRecordPersister
public ManagementPlaneSyncRecord loadSyncRecord() throws java.io.IOException
ManagementPlaneSyncRecordPersister
BrooklynMementoPersister#loadMemento(brooklyn.mementos.BrooklynMementoPersister.LookupContext)
Note that this method is *not* thread safe.
loadSyncRecord
in interface ManagementPlaneSyncRecordPersister
java.io.IOException
public void delta(ManagementPlaneSyncRecordPersister.Delta delta)
delta
in interface ManagementPlaneSyncRecordPersister
public void waitForWritesCompleted(Duration timeout) throws java.lang.InterruptedException, java.util.concurrent.TimeoutException
waitForWritesCompleted
in interface ManagementPlaneSyncRecordPersister
java.lang.InterruptedException
java.util.concurrent.TimeoutException
public void checkpoint(ManagementPlaneSyncRecord record)