public interface FlowFileQueue
Modifier and Type | Method and Description |
---|---|
void |
acknowledge(Collection<FlowFileRecord> flowFiles) |
void |
acknowledge(FlowFileRecord flowFile) |
long |
contentSize() |
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.
|
QueueSize |
getActiveQueueSize() |
String |
getBackPressureDataSizeThreshold() |
long |
getBackPressureObjectThreshold() |
String |
getFlowFileExpiration() |
int |
getFlowFileExpiration(TimeUnit timeUnit) |
String |
getIdentifier() |
List<FlowFilePrioritizer> |
getPriorities() |
int |
getSwapQueueSize() |
int |
getSwapRecordCount() |
int |
getSwapThreshold()
Returns the minimum number of FlowFiles that must be present in order for
FlowFiles to begin being swapped out of the queue
|
void |
incrementSwapCount(int numRecords,
long contentSize)
Updates the internal counters of how much data is queued, based on
swapped data that is being restored.
|
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) |
List<FlowFileRecord> |
pollSwappableRecords()
Removes all records from the internal swap queue and returns them.
|
void |
put(FlowFileRecord file)
places the given file into the queue
|
void |
putAll(Collection<FlowFileRecord> files)
places the given files into the queue
|
void |
putSwappedRecords(Collection<FlowFileRecord> records)
Restores the records from swap space into this queue, adding the records
that have expired to the given set instead of enqueuing them.
|
void |
setBackPressureDataSizeThreshold(String maxDataSize)
Establishes this queue's preferred maximum data size.
|
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() |
int |
unswappedSize()
Returns the number of FlowFiles that are enqueued and not swapped
|
String getIdentifier()
List<FlowFilePrioritizer> getPriorities()
int getSwapThreshold()
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
- String getBackPressureDataSizeThreshold()
QueueSize size()
long contentSize()
boolean isEmpty()
boolean isActiveQueueEmpty()
QueueSize getActiveQueueSize()
void acknowledge(FlowFileRecord flowFile)
void acknowledge(Collection<FlowFileRecord> flowFiles)
boolean isFull()
void put(FlowFileRecord file)
file
- void putAll(Collection<FlowFileRecord> files)
files
- List<FlowFileRecord> pollSwappableRecords()
void putSwappedRecords(Collection<FlowFileRecord> records)
records
- void incrementSwapCount(int numRecords, long contentSize)
numRecords
- contentSize
- int unswappedSize()
int getSwapRecordCount()
int getSwapQueueSize()
FlowFileRecord poll(Set<FlowFileRecord> expiredRecords)
expiredRecords
- List<FlowFileRecord> poll(int maxResults, Set<FlowFileRecord> expiredRecords)
maxResults
- expiredRecords
- long drainQueue(Queue<FlowFileRecord> sourceQueue, List<FlowFileRecord> destination, int maxResults, Set<FlowFileRecord> expiredRecords)
sourceQueue
- destination
- maxResults
- max number to drainexpiredRecords
- List<FlowFileRecord> poll(FlowFileFilter filter, Set<FlowFileRecord> expiredRecords)
String getFlowFileExpiration()
int getFlowFileExpiration(TimeUnit timeUnit)
void setFlowFileExpiration(String flowExpirationPeriod)
Copyright © 2015 Apache NiFi(incubating) Project. All rights reserved.