Class FileSlotAllocationSnapshotPersistenceService
- java.lang.Object
-
- org.apache.flink.runtime.taskexecutor.slot.FileSlotAllocationSnapshotPersistenceService
-
- All Implemented Interfaces:
SlotAllocationSnapshotPersistenceService
public class FileSlotAllocationSnapshotPersistenceService extends Object implements SlotAllocationSnapshotPersistenceService
File basedSlotAllocationSnapshotPersistenceService
that persists theSlotAllocationSnapshot
as local files.
-
-
Constructor Summary
Constructors Constructor Description FileSlotAllocationSnapshotPersistenceService(File slotAllocationSnapshotDirectory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteAllocationSnapshot(int slotIndex)
Delete the slot allocation snapshot identified by the slot index.Collection<SlotAllocationSnapshot>
loadAllocationSnapshots()
Load all persisted slot allocation snapshots.void
persistAllocationSnapshot(SlotAllocationSnapshot slotAllocationSnapshot)
Persist the given slot allocation snapshot.
-
-
-
Constructor Detail
-
FileSlotAllocationSnapshotPersistenceService
public FileSlotAllocationSnapshotPersistenceService(File slotAllocationSnapshotDirectory)
-
-
Method Detail
-
persistAllocationSnapshot
public void persistAllocationSnapshot(SlotAllocationSnapshot slotAllocationSnapshot) throws IOException
Description copied from interface:SlotAllocationSnapshotPersistenceService
Persist the given slot allocation snapshot.- Specified by:
persistAllocationSnapshot
in 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:SlotAllocationSnapshotPersistenceService
Delete the slot allocation snapshot identified by the slot index.- Specified by:
deleteAllocationSnapshot
in interfaceSlotAllocationSnapshotPersistenceService
- Parameters:
slotIndex
- identifying the slot allocation snapshot to delete
-
loadAllocationSnapshots
public Collection<SlotAllocationSnapshot> loadAllocationSnapshots()
Description copied from interface:SlotAllocationSnapshotPersistenceService
Load all persisted slot allocation snapshots.- Specified by:
loadAllocationSnapshots
in interfaceSlotAllocationSnapshotPersistenceService
- Returns:
- loaded slot allocations snapshots
-
-