Example usage for java.lang AutoCloseable interface-usage

List of usage examples for java.lang AutoCloseable interface-usage

Introduction

In this page you can find the example usage for java.lang AutoCloseable interface-usage.

Usage

From source file org.ovirt.engine.sdk.Api.java

/**
 * oVirt virtualization Java SDK.
 */
public class Api implements AutoCloseable {

    private volatile HttpProxyBroker proxy = null;

From source file org.apache.tomee.embedded.TomEEEmbeddedApplicationRunner.java

@Vetoed
public class TomEEEmbeddedApplicationRunner implements AutoCloseable {
    private static final ConcurrentMap<Runnable, Runnable> SHUTDOWN_TASKS = new ConcurrentHashMap<>();

    static { // to ensure we have an ordering for shutdown tasks, we typically want to avoid Files.delete() before stop()
        Runtime.getRuntime().addShutdownHook(new Thread("TomEEEmbeddedApplicationRunner-shutdown") {

From source file org.owasp.dependencycheck.data.nvdcve.CveDB.java

/**
 * The database holding information about the NVD CVE data. This class is safe
 * to be accessed from multiple threads in parallel, however internally only one
 * connection will be used.
 *
 * @author Jeremy Long

From source file com.github.pascalgn.jiracli.web.HttpClient.java

class HttpClient implements AutoCloseable {
    private static final Logger LOGGER = LoggerFactory.getLogger(HttpClient.class);

    private static final int MAX_ERROR_LENGTH = 500;

    private static final Function<Reader, String> TO_STRING;

From source file ai.grakn.engine.backgroundtasks.distributed.TaskRunner.java

public class TaskRunner implements Runnable, AutoCloseable {
    private final KafkaLogger LOG = KafkaLogger.getInstance();
    private final static ConfigProperties properties = ConfigProperties.getInstance();

    private ExecutorService executor;
    private final Integer allowableRunningTasks;

From source file org.apache.drill.exec.expr.fn.FunctionImplementationRegistry.java

/**
 * This class offers the registry for functions. Notably, in addition to Drill its functions
 * (in {@link LocalFunctionRegistry}), other PluggableFunctionRegistry (e.g., {@link org.apache.drill.exec.expr.fn.HiveFunctionRegistry})
 * is also registered in this class
 */
public class FunctionImplementationRegistry implements FunctionLookupContext, AutoCloseable {

From source file org.eclipse.packagedrone.utils.rpm.build.RpmBuilder.java

/**
 * Build RPM files
 * <p>
 * This class takes care of most tasks building RPM files. The constructor only
 * requests the require attributes. There are a few more meta information
 * entries which can be set using the {@link PackageInformation} class and the

From source file org.apache.drill.exec.server.rest.WebServer.java

/**
 * Wrapper class around jetty based webserver.
 */
public class WebServer implements AutoCloseable {
    private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(WebServer.class);

From source file mil.army.usace.data.nativequery.rdbms.NativeRdbmsQuery.java

public abstract class NativeRdbmsQuery implements NativeQuery, AutoCloseable {

    Connection conn;
    private final int GET = 0;
    private final int SET = 1;
    public DB db = null;

From source file org.apache.drill.cv.exec.server.rest.CvDrillWebServer.java

/**
 * Wrapper class around jetty based webserver.
 */
public class CvDrillWebServer implements AutoCloseable {

    private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(CvDrillWebServer.class);