public interface FlowFileSwapManager
| Modifier and Type | Method and Description |
|---|---|
String |
changePartitionName(String swapLocation,
String newPartitionName)
Updates the name of the partition that owns a given swap file
|
String |
getQueueIdentifier(String swapLocation)
Returns the ID of the queue that the given swap file belongs to
|
Set<String> |
getSwappedPartitionNames(FlowFileQueue queue)
Determines the names of each of the Partitions for which there are swap files for the given queue
|
SwapSummary |
getSwapSummary(String swapLocation)
Parses the contents of the swap file at the given location and provides a SwapSummary that provides
pertinent information about the information stored within the swap file
|
void |
initialize(SwapManagerInitializationContext initializationContext)
Initializes the Swap Manager, providing a
SwapManagerInitializationContext so that the
Swap Manager has access to all of the components necessary to perform its functions |
SwapContents |
peek(String swapLocation,
FlowFileQueue flowFileQueue)
Recovers the FlowFiles from the swap file that lives at the given location.
|
void |
purge()
Purge all known Swap Files without updating FlowFileRepository or Provenance Repository
|
List<String> |
recoverSwapLocations(FlowFileQueue flowFileQueue,
String partitionName)
Determines swap files that exist for the given FlowFileQueue
|
SwapContents |
swapIn(String swapLocation,
FlowFileQueue flowFileQueue)
Recovers the FlowFiles from the swap file that lives at the given location and belongs
to the FlowFile Queue with the given identifier.
|
String |
swapOut(List<FlowFileRecord> flowFiles,
FlowFileQueue flowFileQueue,
String partitionName)
Swaps out the given FlowFiles that belong to the queue with the given identifier.
|
void initialize(SwapManagerInitializationContext initializationContext)
SwapManagerInitializationContext so that the
Swap Manager has access to all of the components necessary to perform its functionsinitializationContext - the context the provides the swap manager with access to the
resources that it needs to perform its functionsString swapOut(List<FlowFileRecord> flowFiles, FlowFileQueue flowFileQueue, String partitionName) throws IOException
flowFiles - the FlowFiles to swap out to external storageflowFileQueue - the queue that the FlowFiles belong topartitionName - the name of the partition within the queue, or null if the queue is not partitionedIOException - if unable to swap the FlowFiles outSwapContents peek(String swapLocation, FlowFileQueue flowFileQueue) throws IncompleteSwapFileException, IOException
swapLocation - the location of the swap fileflowFileQueue - the queue that the FlowFiles belong toIOException - if unable to recover the FlowFiles from the given locationIncompleteSwapFileExceptionSwapContents swapIn(String swapLocation, FlowFileQueue flowFileQueue) throws IncompleteSwapFileException, IOException
swapLocation - the location of the swap fileflowFileQueue - the queue to which the FlowFiles belongIOException - if unable to recover the FlowFiles from the given location or update the
FlowFileRepositoryIncompleteSwapFileExceptionList<String> recoverSwapLocations(FlowFileQueue flowFileQueue, String partitionName) throws IOException
flowFileQueue - the queue for which the FlowFiles should be recoveredpartitionName - the partition within the FlowFileQueue to recover, or null if the queue is not partitionedIOExceptionSet<String> getSwappedPartitionNames(FlowFileQueue queue) throws IOException
queue - the queue to which the FlowFiles belongIOException - if unable to read the information from the underlying storageString changePartitionName(String swapLocation, String newPartitionName) throws IOException
swapLocation - the location of the swap filenewPartitionName - the new name of the new partition that owns the swap fileIOException - if unable to rename the swap fileSwapSummary getSwapSummary(String swapLocation) throws IOException
swapLocation - the location of the swap fileIOException - if unable to read or parse the swap filevoid purge()
Copyright © 2023 Apache NiFi Project. All rights reserved.