public boolean isUnacknowledgedFlowFile() { return getFlowFileQueueSize().getUnacknowledgedCount() > 0; }
@Override public boolean isEmpty() { return queue.getFlowFileQueueSize().isEmpty(); }
public QueueSize size() { return getFlowFileQueueSize().toQueueSize(); }
public boolean isEmpty() { return getFlowFileQueueSize().isEmpty(); }
@Override public boolean isActiveQueueEmpty() { final FlowFileQueueSize queueSize = queue.getFlowFileQueueSize(); return queueSize.getActiveCount() == 0 && queueSize.getSwappedCount() == 0; }
public boolean isActiveQueueEmpty() { final FlowFileQueueSize queueSize = getFlowFileQueueSize(); return queueSize.getActiveCount() == 0 && queueSize.getSwappedCount() == 0; }
public RemoteQueuePartitionDiagnostics getDiagnostics() { return new StandardRemoteQueuePartitionDiagnostics(nodeIdentifier.toString(), priorityQueue.getFlowFileQueueSize()); }
public LocalQueuePartitionDiagnostics getQueueDiagnostics() { readLock.lock(); try { final boolean anyPenalized = !activeQueue.isEmpty() && activeQueue.peek().isPenalized(); final boolean allPenalized = anyPenalized && activeQueue.stream().anyMatch(FlowFileRecord::isPenalized); return new StandardLocalQueuePartitionDiagnostics(getFlowFileQueueSize(), anyPenalized, allPenalized); } finally { readLock.unlock("getQueueDiagnostics"); } }
private int getFlowFileCount() { final FlowFileQueueSize size = getFlowFileQueueSize(); return size.getActiveCount() + size.getSwappedCount() + size.getUnacknowledgedCount(); }
final FlowFileQueueSize size = getFlowFileQueueSize(); if (size.getSwappedCount() == 0 && swapQueue.isEmpty()) { return;
boolean updated; do { final FlowFileQueueSize currentSize = getFlowFileQueueSize(); swapSize = new QueueSize(currentSize.getSwappedCount() - swapQueueCount, currentSize.getSwappedBytes() - swapQueueBytes);
final FlowFileQueueSize originalSize = getFlowFileQueueSize();
dropRequest.setDroppedSize(dropRequest.getDroppedSize().add(droppedSize)); final QueueSize swapSize = getFlowFileQueueSize().swapQueueSize(); logger.debug("For DropFlowFileRequest {}, Swap Queue has {} elements, Swapped Record Count = {}, Swapped Content Size = {}", requestIdentifier, swapQueue.size(), swapSize.getObjectCount(), swapSize.getByteCount());
private void incrementSwapQueueSize(final int count, final long bytes, final int fileCount) { boolean updated = false; while (!updated) { final FlowFileQueueSize original = getFlowFileQueueSize(); final FlowFileQueueSize newSize = new FlowFileQueueSize(original.getActiveCount(), original.getActiveBytes(), original.getSwappedCount() + count, original.getSwappedBytes() + bytes, original.getSwapFileCount() + fileCount, original.getUnacknowledgedCount(), original.getUnacknowledgedBytes()); updated = updateSize(original, newSize); if (updated) { logIfNegative(original, newSize, "swap"); } } }