public interface FlowFileQueue
Modifier and Type | Method and Description |
---|---|
void |
acknowledge(Collection<FlowFileRecord> flowFiles) |
void |
acknowledge(FlowFileRecord flowFile) |
DropFlowFileStatus |
cancelDropFlowFileRequest(String requestIdentifier)
Cancels the request to drop FlowFiles that has the given identifier.
|
long |
drainQueue(Queue<FlowFileRecord> sourceQueue,
List<FlowFileRecord> destination,
int maxResults,
Set<FlowFileRecord> expiredRecords)
Drains flow files from the given source queue into the given destination
list.
|
DropFlowFileStatus |
dropFlowFiles(String requestIdentifier,
String requestor)
Initiates a request to drop all FlowFiles in this queue.
|
String |
getBackPressureDataSizeThreshold() |
long |
getBackPressureObjectThreshold() |
DropFlowFileStatus |
getDropFlowFileStatus(String requestIdentifier)
Returns the current status of a Drop FlowFile Request that was initiated via the
#dropFlowFiles() method that has the given identifier |
String |
getFlowFileExpiration() |
int |
getFlowFileExpiration(TimeUnit timeUnit) |
String |
getIdentifier() |
List<FlowFilePrioritizer> |
getPriorities() |
QueueSize |
getUnacknowledgedQueueSize()
Returns a QueueSize that represents all FlowFiles that are 'unacknowledged'.
|
boolean |
isActiveQueueEmpty() |
boolean |
isEmpty() |
boolean |
isFull() |
List<FlowFileRecord> |
poll(FlowFileFilter filter,
Set<FlowFileRecord> expiredRecords) |
List<FlowFileRecord> |
poll(int maxResults,
Set<FlowFileRecord> expiredRecords) |
FlowFileRecord |
poll(Set<FlowFileRecord> expiredRecords) |
void |
purgeSwapFiles()
Destroys any Swap Files that exist for this queue without updating the FlowFile Repository
or Provenance Repository.
|
void |
put(FlowFileRecord file)
places the given file into the queue
|
void |
putAll(Collection<FlowFileRecord> files)
places the given files into the queue
|
Long |
recoverSwappedFlowFiles()
Reads any Swap Files that belong to this queue and increments counts so that the size
of the queue will reflect the size of all FlowFiles regardless of whether or not they are
swapped out.
|
void |
setBackPressureDataSizeThreshold(String maxDataSize) |
void |
setBackPressureObjectThreshold(long maxQueueSize)
Establishes this queue's preferred maximum work load.
|
void |
setFlowFileExpiration(String flowExpirationPeriod) |
void |
setPriorities(List<FlowFilePrioritizer> newPriorities)
Resets the comparator used by this queue to maintain order.
|
QueueSize |
size() |
String getIdentifier()
List<FlowFilePrioritizer> getPriorities()
Long recoverSwappedFlowFiles()
null
if no FlowFiles are swapped out for this queue.null
if
no FlowFiles are swapped out for this queue.void purgeSwapFiles()
void setPriorities(List<FlowFilePrioritizer> newPriorities)
newPriorities
- the ordered list of prioritizers to use to determine
order within this queue.NullPointerException
- if arg is nullvoid setBackPressureObjectThreshold(long maxQueueSize)
maxQueueSize
- the maximum number of flow files this processor
recommends having in its work queue at any one timelong getBackPressureObjectThreshold()
void setBackPressureDataSizeThreshold(String maxDataSize)
maxDataSize
- Establishes this queue's preferred maximum data size.String getBackPressureDataSizeThreshold()
QueueSize size()
boolean isEmpty()
boolean isActiveQueueEmpty()
true
if the queue is empty or contains only FlowFiles that already are being processed
by others, false
if the queue contains at least one FlowFile that is available for processing,
regardless of whether that FlowFile(s) is in-memory or swapped out.QueueSize getUnacknowledgedQueueSize()
void acknowledge(FlowFileRecord flowFile)
void acknowledge(Collection<FlowFileRecord> flowFiles)
boolean isFull()
void put(FlowFileRecord file)
file
- to place into queuevoid putAll(Collection<FlowFileRecord> files)
files
- to place into queueFlowFileRecord poll(Set<FlowFileRecord> expiredRecords)
expiredRecords
- expired recordsList<FlowFileRecord> poll(int maxResults, Set<FlowFileRecord> expiredRecords)
maxResults
- limits how many results can be polledexpiredRecords
- for expired recordslong drainQueue(Queue<FlowFileRecord> sourceQueue, List<FlowFileRecord> destination, int maxResults, Set<FlowFileRecord> expiredRecords)
sourceQueue
- queue to drain fromdestination
- Collection to drain tomaxResults
- max number to drainexpiredRecords
- for expired recordsList<FlowFileRecord> poll(FlowFileFilter filter, Set<FlowFileRecord> expiredRecords)
String getFlowFileExpiration()
int getFlowFileExpiration(TimeUnit timeUnit)
void setFlowFileExpiration(String flowExpirationPeriod)
DropFlowFileStatus dropFlowFiles(String requestIdentifier, String requestor)
getDropFlowFileStatus(String)
and #cancelDropFlowFileStatus(String)
methods in order to obtain the status later or cancel a requestrequestor
- the entity that is requesting that the FlowFiles be dropped; this will be
included in the Provenance Events that are generated.DropFlowFileStatus getDropFlowFileStatus(String requestIdentifier)
#dropFlowFiles()
method that has the given identifierrequestIdentifier
- the identifier of the Drop FlowFile Requestnull
if no
request status exists with that identifierDropFlowFileStatus cancelDropFlowFileRequest(String requestIdentifier)
getDropFlowFileStatus(String)
or
cancelDropFlowFileRequest(String)
will return null
requestIdentifier
- the identifier of the Drop FlowFile Requestnull
if no
request status exists with that identifierCopyright © 2015 Apache NiFi Project. All rights reserved.