public interface FlowFileSwapManager
Modifier and Type | Method and Description |
---|---|
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)
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)
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) throws IOException
flowFiles
- the FlowFiles to swap out to external storageflowFileQueue
- the queue that the FlowFiles belong toIOException
- 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 locationIncompleteSwapFileException
SwapContents 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
FlowFileRepositoryIncompleteSwapFileException
List<String> recoverSwapLocations(FlowFileQueue flowFileQueue) throws IOException
flowFileQueue
- the queue for which the FlowFiles should be recoveredIOException
SwapSummary getSwapSummary(String swapLocation) throws IOException
swapLocation
- the location of the swap fileIOException
- if unable to read or parse the swap filevoid purge()
Copyright © 2017 Apache NiFi Project. All rights reserved.