Class FileSlotAllocationSnapshotPersistenceService
- java.lang.Object
-
- org.apache.flink.runtime.taskexecutor.slot.FileSlotAllocationSnapshotPersistenceService
-
- All Implemented Interfaces:
SlotAllocationSnapshotPersistenceService
public class FileSlotAllocationSnapshotPersistenceService extends Object implements SlotAllocationSnapshotPersistenceService
File basedSlotAllocationSnapshotPersistenceServicethat persists theSlotAllocationSnapshotas local files.
-
-
Constructor Summary
Constructors Constructor Description FileSlotAllocationSnapshotPersistenceService(File slotAllocationSnapshotDirectory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteAllocationSnapshot(int slotIndex)Delete the slot allocation snapshot identified by the slot index.Collection<SlotAllocationSnapshot>loadAllocationSnapshots()Load all persisted slot allocation snapshots.voidpersistAllocationSnapshot(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: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
public Collection<SlotAllocationSnapshot> loadAllocationSnapshots()
Description copied from interface:SlotAllocationSnapshotPersistenceServiceLoad all persisted slot allocation snapshots.- Specified by:
loadAllocationSnapshotsin interfaceSlotAllocationSnapshotPersistenceService- Returns:
- loaded slot allocations snapshots
-
-