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() |
QueueSize |
getUnacknowledgedQueueSize()
Returns a QueueSize that represents all FlowFiles that are 'unacknowledged'.
|
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) |
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() |
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
- Establishes this queue's preferred maximum data size.String getBackPressureDataSizeThreshold()
QueueSize size()
long contentSize()
boolean isEmpty()
boolean isActiveQueueEmpty()
QueueSize getActiveQueueSize()
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 queueList<FlowFileRecord> pollSwappableRecords()
void putSwappedRecords(Collection<FlowFileRecord> records)
records
- that were swapped invoid incrementSwapCount(int numRecords, long contentSize)
numRecords
- count of records swapped incontentSize
- total size of records being swapped inint unswappedSize()
int getSwapRecordCount()
int getSwapQueueSize()
FlowFileRecord 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)
Copyright © 2015 Apache NiFi Project. All rights reserved.