Class FileSlotAllocationSnapshotPersistenceService
java.lang.Object
org.apache.flink.runtime.taskexecutor.slot.FileSlotAllocationSnapshotPersistenceService
- All Implemented Interfaces:
SlotAllocationSnapshotPersistenceService
public class FileSlotAllocationSnapshotPersistenceService
extends Object
implements SlotAllocationSnapshotPersistenceService
File based
SlotAllocationSnapshotPersistenceService that persists the SlotAllocationSnapshot as local files.-
Constructor Summary
ConstructorsConstructorDescriptionFileSlotAllocationSnapshotPersistenceService(File slotAllocationSnapshotDirectory) -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteAllocationSnapshot(int slotIndex) Delete the slot allocation snapshot identified by the slot index.Load all persisted slot allocation snapshots.voidpersistAllocationSnapshot(SlotAllocationSnapshot slotAllocationSnapshot) Persist the given slot allocation snapshot.
-
Constructor Details
-
FileSlotAllocationSnapshotPersistenceService
-
-
Method Details
-
persistAllocationSnapshot
public void persistAllocationSnapshot(SlotAllocationSnapshot slotAllocationSnapshot) throws IOException Description copied from interface:SlotAllocationSnapshotPersistenceServicePersist the given slot allocation snapshot.- Specified by:
persistAllocationSnapshotin interfaceSlotAllocationSnapshotPersistenceService- Parameters:
slotAllocationSnapshot- slot allocation snapshot to persist- Throws:
IOException- if the slot allocation snapshot cannot be persisted
-
deleteAllocationSnapshot
public void deleteAllocationSnapshot(int slotIndex) Description copied from interface:SlotAllocationSnapshotPersistenceServiceDelete the slot allocation snapshot identified by the slot index.- Specified by:
deleteAllocationSnapshotin interfaceSlotAllocationSnapshotPersistenceService- Parameters:
slotIndex- identifying the slot allocation snapshot to delete
-
loadAllocationSnapshots
Description copied from interface:SlotAllocationSnapshotPersistenceServiceLoad all persisted slot allocation snapshots.- Specified by:
loadAllocationSnapshotsin interfaceSlotAllocationSnapshotPersistenceService- Returns:
- loaded slot allocations snapshots
-