List of usage examples for java.lang AutoCloseable interface-usage
From source file org.opendaylight.genius.utils.batching.ResourceBatchingManager.java
/**
* This class lets other modules submit their CRUD methods to it. This class
* will then supply a single transaction to such CRUD methods of the
* subscribers, on which such subscribers write data to that transaction.
* Finally the framework attempts to reliably write this single transaction
* which represents a batch of an ordered list of entities owned by that subscriber,
From source file majordodo.client.http.Client.java
/** * HTTP Client of Majordodo. Provides connection pooling * * @author enrico.olivelli */ public class Client implements AutoCloseable {
From source file com.act.utils.TSVWriter.java
public class TSVWriter<K, V> implements AutoCloseable { public static final CSVFormat TSV_FORMAT = CSVFormat.newFormat('\t').withRecordSeparator('\n').withQuote('"') .withIgnoreEmptyLines(true); private List<K> header; private CSVPrinter printer;
From source file com.optimizely.ab.event.AsyncEventHandler.java
/** * {@link EventHandler} implementation that queues events and has a separate pool of threads responsible * for the dispatch. */ public class AsyncEventHandler implements EventHandler, AutoCloseable {
From source file org.echocat.jomon.net.dns.DnsServer.java
/** * @author Brian Wellington <bwelling@xbill.org> */ @SuppressWarnings({ "ContinueStatement", "OverlyLongMethod", "MethodWithMultipleReturnPoints", "AssignmentToMethodParameter", "InfiniteLoopStatement", "StatementWithEmptyBody" })
From source file org.commonjava.util.partyline.JoinableFile.java
/**
* {@link OutputStream} implementation backed by a {@link RandomAccessFile} / {@link FileChannel} combination, and allowing multiple callers to "join"
* and retrieve {@link InputStream} instances that can read the content as it becomes available. The {@link InputStream}s that are generated are tuned
* to wait for content until the associated {@link JoinableFile} notifies them that it is closed.
*
* @author jdcasey
From source file com.codeabovelab.dm.gateway.proxy.common.HttpProxy.java
/** * Java HTTP proxy which is based on * https://github.com/mitre/HTTP-Proxy-Servlet (author David Smiley dsmiley@mitre.org). <p/> * We do some refactoring and remove servlet dependency. */ public class HttpProxy implements AutoCloseable {
From source file broadwick.data.DataReader.java
/** * Utility class to read, store and manipulate the data files. */ @Slf4j public class DataReader implements java.lang.AutoCloseable {
From source file de.metas.ui.web.view.event.DocumentViewChangesCollector.java
public class DocumentViewChangesCollector implements AutoCloseable { public static final DocumentViewChangesCollector newThreadLocalCollector() { final DocumentViewChangesCollector currentCollector = THREADLOCAL.get(); if (currentCollector != null && !currentCollector.isClosed()) { throw new IllegalStateException("A collector was already created for current thread"); }
From source file org.apache.sentry.core.common.transport.SentryTransportPool.java
/**
* Pool of transport connections to Sentry servers.
* The pool caches open connections to multiple Sentry servers,
* specified in the configuration.
*
* When transport pooling is disabled in configuration,