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 nl.knaw.huygens.alexandria.markup.client.AlexandriaMarkupClient.java

public class AlexandriaMarkupClient implements AutoCloseable {

    public static final String LOCATION = "Location";
    private static final String HEADER_AUTH = "auth";
    private WebTarget rootTarget;
    private final Client client;

From source file io.mapzone.arena.csw.catalog.ProjectNodeSynchronizer.java

/**
 * Listens to {@link ProjectNodeCommittedEvent}s and synchronizes {@link IMap}
 * and {@link ILayer} with their corresponding metadata in an {@link IMetadataCatalog}.
 *
 * @author Falko Brutigam
 */

From source file io.specto.hoverfly.junit.core.Hoverfly.java

import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.zeroturnaround.exec.ProcessExecutor;
import org.zeroturnaround.exec.StartedProcess;

From source file io.pravega.segmentstore.server.host.ZKSegmentContainerMonitor.java

/**
 * Monitors the current set of running segment containers and ensure it matches the ownership assignment for this host.
 * This monitor watches the shared zk entry that contains the segment container ownership information
 * and starts or stops appropriate segment containers locally. Any start failures are periodically retried until
 * the desired ownership state is achieved.
 */

From source file io.fluo.core.impl.Environment.java

/**
 * Holds common environment configuration and shared resources
 */
public class Environment implements AutoCloseable {

    private String table;

From source file se.svt.helios.serviceregistration.consul.ConsulClient.java

public class ConsulClient implements AutoCloseable {
    private static final Logger log = LoggerFactory.getLogger(ConsulClient.class);
    private static final int CONNECT_TIMEOUT = 5000; // ms
    private static final int CONNECTION_REQUEST_TIMEOUT = 5000; // ms
    private static final int SOCKET_TIMEOUT = 5000; // ms

From source file org.apache.sentry.service.thrift.LeaderStatusMonitor.java

/**
 * LeaderStatusMonitor participates in the distributed leader election protocol
 * and allows clients to access the global leaadership status.
 * <p>
 * LeaderStatusMonitor is a singleton that uses Curator framework via
 * {@link HAContext}.The leadership status can be accessed via the

From source file cloudfoundry.norouter.f5.Agent.java

/**
 * @author Mike Heath
 */
// TODO Should we loggregate when pool members are added/removed?
// TODO If we throw an exception adding a route, what do we do?
public class Agent implements ApplicationListener<ApplicationEvent>, Ordered, AutoCloseable {

From source file org.icgc.dcc.portal.manifest.ManifestArchive.java

public class ManifestArchive implements AutoCloseable {

    /**
     * State.
     */
    private final TarArchiveOutputStream tar;

From source file org.apache.reef.runtime.yarn.driver.restart.DFSEvaluatorPreserver.java

/**
 * An Evaluator Preserver that uses the DFS on YARN.
 */
@DriverSide
@RuntimeAuthor
@Unstable