public interface FlowFileSwapManager
Modifier and Type | Method and Description |
---|---|
Long |
getMaxRecordId(String swapLocation)
Returns the maximum record id of the FlowFiles stored at the given swap location
|
QueueSize |
getSwapSize(String swapLocation)
Determines how many FlowFiles and the size of the FlowFiles that are swapped out at the given location
|
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 |
List<FlowFileRecord> |
peek(String swapLocation,
FlowFileQueue flowFileQueue)
Recovers the SwapFiles 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
|
List<FlowFileRecord> |
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 outList<FlowFileRecord> peek(String swapLocation, FlowFileQueue flowFileQueue) throws IOException
swapLocation
- the location of the swap fileflowFileQueue
- the queue that the FlowFiles belong toIOException
- if unable to recover the FlowFiles from the given locationList<FlowFileRecord> swapIn(String swapLocation, FlowFileQueue flowFileQueue) throws 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
FlowFileRepositoryList<String> recoverSwapLocations(FlowFileQueue flowFileQueue) throws IOException
flowFileQueue
- the queue for which the FlowFiles should be recoveredIOException
QueueSize getSwapSize(String swapLocation) throws IOException
swapLocation
- the location of the swap fileIOException
Long getMaxRecordId(String swapLocation) throws IOException
swapLocation
- the swap location to read id's fromIOException
void purge()
Copyright © 2015 Apache NiFi Project. All rights reserved.