Codota Logo
Connection.close
Code IndexAdd Codota to your IDE (free)

How to use
close
method
in
org.terracotta.connection.Connection

Best Java code snippets using org.terracotta.connection.Connection.close (Showing top 11 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: ehcache/ehcache3

public void closeConnection() {
 Connection conn = clusterConnection;
 clusterConnection = null;
 if(conn != null) {
  try {
   conn.close();
  } catch (IOException | ConnectionShutdownException e) {
   LOGGER.warn("Error closing cluster connection: " + e);
  }
 }
}
origin: ehcache/ehcache3

@AfterClass
public static void closeAssertionConnection() throws IOException {
 ASSERTION_CONNECTION.close();
}
origin: ehcache/ehcache3

@AfterClass
public static void closeConnection() throws IOException {
 CONNECTION.close();
}
origin: ehcache/ehcache3

private void closeConnection() throws IOException {
 Collection<Connection> connections = UnitTestConnectionService.getConnections(CLUSTER_URI);
 assertThat(connections.size(), is(1));
 Connection connection = connections.iterator().next();
 connection.close();
}
origin: ehcache/ehcache3

public static void removeStripe(String stripeName) {
 StripeDescriptor stripeDescriptor = STRIPES.remove(stripeName);
 for (Connection connection : stripeDescriptor.getConnections()) {
  try {
   LOGGER.warn("Force close {}", formatConnectionId(connection));
   connection.close();
  } catch (IllegalStateException | IOException e) {
   // Ignored in case connection is already closed
  }
 }
 stripeDescriptor.removeConnections();
}
origin: ehcache/ehcache3

@Test
public void testInitializeStateAfterConnectionCloses() throws Exception {
 ConnectionState connectionState = new ConnectionState(Timeouts.DEFAULT, new Properties(), serviceConfiguration);
 connectionState.initClusterConnection();
 closeConnection();
 expectedException.expect(IllegalStateException.class);
 connectionState.getConnection().close();
 connectionState.initializeState();
 assertThat(connectionState.getConnection(), notNullValue());
 assertThat(connectionState.getEntityFactory(), notNullValue());
 connectionState.getConnection().close();
}
origin: ehcache/ehcache3

try {
 LOGGER.warn("Force close {}", formatConnectionId(connection));
 connection.close();
} catch (AssertionError | IOException e) {
origin: ehcache/ehcache3

connection.close();
origin: ehcache/ehcache3

public static void tearDownCacheManagerAndStatsCollector() throws Exception {
 if (cacheManager != null && cacheManager.getStatus() == Status.AVAILABLE) {
  if (nmsService != null) {
   readTopology().getClient(ehcacheClientIdentifier)
    .ifPresent(client -> {
     try {
      nmsService.stopStatisticCollector(client.getContext().with("cacheManagerName", "my-super-cache-manager")).waitForReturn();
     } catch (Exception e) {
      throw new RuntimeException(e);
     }
    });
  }
  cacheManager.close();
 }
 if (nmsService != null) {
  readTopology().getSingleStripe().getActiveServerEntity(tmsServerEntityIdentifier)
   .ifPresent(client -> {
    try {
     nmsService.stopStatisticCollector(client.getContext());
    } catch (Exception e) {
     throw new RuntimeException(e);
    }
   });
  managementConnection.close();
 }
}
origin: ehcache/ehcache3

client.close();
origin: org.ehcache/ehcache-clustered

public void closeConnection() {
 Connection conn = clusterConnection;
 clusterConnection = null;
 if(conn != null) {
  try {
   conn.close();
  } catch (IOException | ConnectionShutdownException e) {
   LOGGER.warn("Error closing cluster connection: " + e);
  }
 }
}
org.terracotta.connectionConnectionclose

Popular methods of Connection

  • getEntityRef
    Get a reference to the given entity. The entity may or may not yet exist. This is a pointer to the s

Popular in Java

  • Start an intent from android
  • onRequestPermissionsResult (Fragment)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • notifyDataSetChanged (ArrayAdapter)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • JLabel (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now