@Override public void signalAllWhenBlocking() { if (signalNeeded.getAndSet(false)) { synchronized (mutex) { mutex.notifyAll(); } } }
@Override public void signalAllWhenBlocking() { if (signalNeeded.getAndSet(false)) { synchronized (mutex) { mutex.notifyAll(); } } }
@Override public void nodeViewInitialized() { if (!initialized.getAndSet(true)) { executor.execute(HttpServerInventoryView.this::serverInventoryInitialized); } }
@Override public boolean isCacheMiss() { return this.cacheMiss.getAndSet(false); }
private boolean endOfData() { if (!reported.getAndSet(true)) { log.debug("Read a total of %d values with %d bytes.", totalValues, totalBytes); } return false; }
@Override public void close() { if (!isClosed.getAndSet(true)) { cache.cleanUp(); } }
@Override public void close() { if (!closed.getAndSet(true)) { DB.delete(name); } }
@Override public synchronized boolean close() { if (started.getAndSet(false)) { LOGGER.info("closing loading lookup [%s]", id); loadingLookup.close(); } return !started.get(); }
@Override public boolean close() { synchronized (started) { if (started.getAndSet(false)) { LOGGER.info("closing polling lookup [%s]", id); pollingLookup.close(); } return !started.get(); } }
@Override public void setAutoCommit(boolean autoCommit) throws SQLException { checkOpen(); boolean wasAutoCommit = this.autoCommit.getAndSet(autoCommit); if (autoCommit && !wasAutoCommit) { commit(); } }
@Override public void close() throws IOException { if (!closed.getAndSet(true)) { flush(true); printer.finish(); } }
@Override public void close() { synchronized (started) { if (started.getAndSet(false)) { DB.delete(cacheName); DB.delete(reverseCacheName); } } }
public void start() throws InterruptedException, IOException { if (!started.getAndSet(true)) { cnxnFactory.startup(zkServer); } }
@Override public void returnResource() { if (returned.getAndSet(true)) { log.warn(StringUtils.format("Resource at key[%s] was returned multiple times?", key)); } else { holder.giveBack(value); } }
public synchronized void close() { if (isOpen.getAndSet(false)) { LOGGER.info("Closing loading cache [%s]", id); loadingCache.close(); reverseLoadingCache.close(); } else { LOGGER.info("Closing already closed lookup"); return; } }
public void start() throws InterruptedException, IOException { if (!started.getAndSet(true)) { zookeeper.start(); kafka.startup(); } }
private boolean endOfData() { if (!reported.getAndSet(true)) { log.debug("Found a total of %d messages with %d bytes (%d messages expected). Last Offset: %d (%d, %d)", totalMessages, totalBytes, split.getEnd() - split.getStart(), cursorOffset, split.getStart(), split.getEnd()); } return false; }
@Override public void close() throws IOException { if (started.get() && !stopped.getAndSet(true)) { kafka.shutdown(); kafka.awaitShutdown(); zookeeper.close(); deleteRecursively(kafkaDataDir.toPath(), ALLOW_INSECURE); } }