final long recording = Long.parseLong(fileName.split("-")[0]); return !recordingIds.contains(recording); }).map(Path::toFile).forEach(this::deleteFile);
boolean isAuthenticated(final long sessionId) { return currentlyAuthenticatedSessionIds.contains(sessionId); }
/** * LongHashSet specialised variant of {this#containsAll(Collection)}. * * @param other long hash set to compare against. * @return true if every element in other is in this. */ public boolean containsAll(final LongHashSet other) { for (final long value : other.values) { if (value != MISSING_VALUE && !contains(value)) { return false; } } return !other.containsMissingValue || this.containsMissingValue; }
/** * LongHashSet specialised variant of {this#containsAll(Collection)}. * * @param other long hash set to compare against. * @return true if every element in other is in this. */ public boolean containsAll(final LongHashSet other) { final long missingValue = other.missingValue; for (final long value : other.values) { if (value != missingValue && !contains(value)) { return false; } } return true; }
/** * {@inheritDoc} */ public boolean contains(final Object value) { return value instanceof Long && contains(((Long)value).longValue()); }
/** * {@inheritDoc} */ public boolean contains(final Object value) { return value instanceof Long && contains(((Long)value).longValue()); }
/** * {@inheritDoc} */ @Override public void onStatisticsUpdated(final InetAddress inetAddress, final int port, final long socketIdentifier, final long inode, final long receiveQueueDepth, final long transmitQueueDepth) { if(socketInodesNotOwnedByThisProcess.contains(inode)) { return; } if(!socketInodesOwnedByThisProcess.contains(inode)) { socketInodeRetriever.accept(socketInodesOwnedByThisProcess); if(!socketInodesOwnedByThisProcess.contains(inode)) { clearNotOwnedInodeCacheIfTooLarge(); socketInodesNotOwnedByThisProcess.add(inode); } } if(socketInodesOwnedByThisProcess.contains(inode)) { delegate.onStatisticsUpdated(inetAddress, port, socketIdentifier, inode, receiveQueueDepth, transmitQueueDepth); } }
/** * {@inheritDoc} */ @Override public void onStatisticsUpdated(final InetAddress inetAddress, final int port, final long socketIdentifier, final long inode, final long receiveQueueDepth, final long transmitQueueDepth, final long drops) { if(socketInodesNotOwnedByThisProcess.contains(inode)) { return; } if(!socketInodesOwnedByThisProcess.contains(inode)) { socketInodeRetriever.accept(socketInodesOwnedByThisProcess); if(!socketInodesOwnedByThisProcess.contains(inode)) { clearNotOwnedInodeCacheIfTooLarge(); socketInodesNotOwnedByThisProcess.add(inode); } } if(socketInodesOwnedByThisProcess.contains(inode)) { delegate.onStatisticsUpdated(inetAddress, port, socketIdentifier, inode, receiveQueueDepth, transmitQueueDepth, drops); } }
/** * Fast Path set difference for comparison with another LongHashSet. * <p> * NB: garbage free in the identical case, allocates otherwise. * * @param other the other set to subtract * @return null if identical, otherwise the set of differences */ public LongHashSet difference(final LongHashSet other) { LongHashSet difference = null; final long missingValue = this.missingValue; for (final long value : values) { if (value != missingValue && !other.contains(value)) { if (difference == null) { difference = new LongHashSet(size, missingValue); } difference.add(value); } } return difference; }
protected boolean putDeployment( final long deploymentKey, final DeploymentRecord deploymentRecord) { final boolean isNewDeployment = !deployments.contains(deploymentKey); if (isNewDeployment) { for (final Workflow workflow : deploymentRecord.workflows()) { final long workflowKey = workflow.getKey(); final DirectBuffer resourceName = workflow.getResourceName(); for (final DeploymentResource resource : deploymentRecord.resources()) { if (resource.getResourceName().equals(resourceName)) { persistWorkflow(workflowKey, workflow, resource); } } } deployments.add(deploymentKey); } return isNewDeployment; }
protected boolean putDeployment( final long deploymentKey, final DeploymentRecord deploymentRecord) { final boolean isNewDeployment = !deployments.contains(deploymentKey); if (isNewDeployment) { for (final Workflow workflow : deploymentRecord.workflows()) { final long workflowKey = workflow.getKey(); final DirectBuffer resourceName = workflow.getResourceName(); for (final DeploymentResource resource : deploymentRecord.resources()) { if (resource.getResourceName().equals(resourceName)) { persistWorkflow(workflowKey, workflow, resource); } } } deployments.add(deploymentKey); } return isNewDeployment; }
if (value != MISSING_VALUE && !other.contains(value))