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.
|
ListFlowFileStatus |
cancelListFlowFileRequest(String requestIdentifier)
Cancels the request to list FlowFiles that has the given identifier.
|
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(String, String) method that has the given identifier |
FlowFileRecord |
getFlowFile(String flowFileUuid)
Returns the FlowFile with the given UUID or
null if no FlowFile can be found in this queue
with the given UUID |
FlowFileAvailability |
getFlowFileAvailability() |
String |
getFlowFileExpiration() |
long |
getFlowFileExpiration(TimeUnit timeUnit) |
String |
getIdentifier() |
ListFlowFileStatus |
getListFlowFileStatus(String requestIdentifier)
Returns the current status of a List FlowFile Request that was initiated via the
listFlowFiles(String, int)
method that has the given identifier |
LoadBalanceCompression |
getLoadBalanceCompression() |
LoadBalanceStrategy |
getLoadBalanceStrategy() |
long |
getMinLastQueueDate() |
String |
getPartitioningAttribute() |
List<FlowFilePrioritizer> |
getPriorities() |
QueueDiagnostics |
getQueueDiagnostics()
Returns diagnostic information about the queue
|
long |
getTotalQueuedDuration(long fromTimestamp) |
boolean |
isActivelyLoadBalancing() |
boolean |
isActiveQueueEmpty() |
boolean |
isEmpty() |
boolean |
isFull() |
boolean |
isUnacknowledgedFlowFile() |
ListFlowFileStatus |
listFlowFiles(String requestIdentifier,
int maxResults)
Initiates a request to obtain a listing of FlowFiles in this queue.
|
void |
lock() |
void |
offloadQueue()
Offloads the flowfiles in the queue to other nodes.
|
List<FlowFileRecord> |
poll(FlowFileFilter filter,
Set<FlowFileRecord> expiredRecords) |
List<FlowFileRecord> |
poll(FlowFileFilter filter,
Set<FlowFileRecord> expiredRecords,
PollStrategy pollStrategy) |
List<FlowFileRecord> |
poll(int maxResults,
Set<FlowFileRecord> expiredRecords) |
List<FlowFileRecord> |
poll(int maxResults,
Set<FlowFileRecord> expiredRecords,
PollStrategy pollStrategy) |
FlowFileRecord |
poll(Set<FlowFileRecord> expiredRecords) |
FlowFileRecord |
poll(Set<FlowFileRecord> expiredRecords,
PollStrategy pollStrategy) |
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
|
SwapSummary |
recoverSwappedFlowFiles()
Reads any Swap Files that belong to this queue and returns a summary of what is swapped out.
|
void |
resetOffloadedQueue()
Resets a queue that has previously been offloaded.
|
void |
setBackPressureDataSizeThreshold(String maxDataSize) |
void |
setBackPressureObjectThreshold(long maxQueueSize)
Establishes this queue's preferred maximum work load.
|
void |
setFlowFileExpiration(String flowExpirationPeriod) |
void |
setLoadBalanceCompression(LoadBalanceCompression compression) |
void |
setLoadBalanceStrategy(LoadBalanceStrategy strategy,
String partitioningAttribute) |
void |
setPriorities(List<FlowFilePrioritizer> newPriorities)
Resets the comparator used by this queue to maintain order.
|
QueueSize |
size() |
void |
startLoadBalancing() |
void |
stopLoadBalancing() |
void |
unlock() |
void |
verifyCanList()
Ensures that a listing can be performed on the queue
|
String getIdentifier()
List<FlowFilePrioritizer> getPriorities()
SwapSummary recoverSwappedFlowFiles()
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()
long getTotalQueuedDuration(long fromTimestamp)
fromTimestamp - The timestamp in milliseconds from which to calculate durations. This will typically be the current timestamp.long getMinLastQueueDate()
boolean isEmpty()
FlowFileAvailability getFlowFileAvailability()
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.void acknowledge(FlowFileRecord flowFile)
void acknowledge(Collection<FlowFileRecord> flowFiles)
boolean isUnacknowledgedFlowFile()
true if at least one FlowFile is unacknowledged, false if all FlowFiles that have been dequeued have been acknowledgedboolean isFull()
void put(FlowFileRecord file)
file - to place into queuevoid putAll(Collection<FlowFileRecord> files)
files - to place into queueFlowFileRecord poll(Set<FlowFileRecord> expiredRecords, PollStrategy pollStrategy)
expiredRecords - expired recordspollStrategy - strategy of pollingFlowFileRecord poll(Set<FlowFileRecord> expiredRecords)
List<FlowFileRecord> poll(int maxResults, Set<FlowFileRecord> expiredRecords, PollStrategy pollStrategy)
maxResults - limits how many results can be polledexpiredRecords - for expired recordspollStrategy - strategy of pollingList<FlowFileRecord> poll(int maxResults, Set<FlowFileRecord> expiredRecords)
List<FlowFileRecord> poll(FlowFileFilter filter, Set<FlowFileRecord> expiredRecords, PollStrategy pollStrategy)
List<FlowFileRecord> poll(FlowFileFilter filter, Set<FlowFileRecord> expiredRecords)
String getFlowFileExpiration()
long getFlowFileExpiration(TimeUnit timeUnit)
void setFlowFileExpiration(String flowExpirationPeriod)
DropFlowFileStatus dropFlowFiles(String requestIdentifier, String requestor)
getDropFlowFileStatus(String) and cancelDropFlowFileRequest(String)
methods in order to obtain the status later or cancel a requestrequestIdentifier - the identifier of the Drop FlowFile 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(String, String) 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 nullrequestIdentifier - the identifier of the Drop FlowFile Requestnull if no
request status exists with that identifierListFlowFileStatus listFlowFiles(String requestIdentifier, int maxResults)
Initiates a request to obtain a listing of FlowFiles in this queue. This method returns a
ListFlowFileStatus that can be used to obtain information about the FlowFiles that exist
within the queue. Additionally, the ListFlowFileStatus provides a request identifier that
can then be passed to the getListFlowFileStatus(String). The listing of FlowFiles
will be returned ordered by the position of the FlowFile in the queue.
Note that if maxResults is larger than the size of the "active queue" (i.e., the un-swapped queued, FlowFiles that are swapped out will not be returned.)
requestIdentifier - the identifier of the List FlowFile RequestmaxResults - the maximum number of FlowFileSummary objects to add to the ListFlowFileStatusIllegalStateException - if either the source or the destination of the connection to which this queue belongs
is currently running.ListFlowFileStatus getListFlowFileStatus(String requestIdentifier)
listFlowFiles(String, int)
method that has the given identifierrequestIdentifier - the identifier of the Drop FlowFile Requestnull if no
request status exists with that identifierListFlowFileStatus cancelListFlowFileRequest(String requestIdentifier)
getListFlowFileStatus(String) or
cancelListFlowFileRequest(String) will return nullrequestIdentifier - the identifier of the Drop FlowFile Requestnull if no
request status exists with that identifierFlowFileRecord getFlowFile(String flowFileUuid) throws IOException
null if no FlowFile can be found in this queue
with the given UUIDflowFileUuid - the UUID of the FlowFile to retrievenull if no FlowFile can be found in this queue
with the given UUIDIOException - if unable to read FlowFiles that are stored on some external devicevoid verifyCanList()
throws IllegalStateException
IllegalStateException - if the queue is not in a state in which a listing can be performedQueueDiagnostics getQueueDiagnostics()
void lock()
void unlock()
void setLoadBalanceStrategy(LoadBalanceStrategy strategy, String partitioningAttribute)
void offloadQueue()
This operation is a no-op if the node that contains this queue is not in a cluster.
void resetOffloadedQueue()
This operation is a no-op if the queue is not currently offloaded or the node that contains this queue is not clustered.
LoadBalanceStrategy getLoadBalanceStrategy()
void setLoadBalanceCompression(LoadBalanceCompression compression)
LoadBalanceCompression getLoadBalanceCompression()
String getPartitioningAttribute()
void startLoadBalancing()
void stopLoadBalancing()
boolean isActivelyLoadBalancing()
true if the queue is actively transferring data to another node, false otherwiseCopyright © 2023 Apache NiFi Project. All rights reserved.