net.spy.memcached.MemcachedClient.shutdown()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(273)

本文整理了Java中net.spy.memcached.MemcachedClient.shutdown()方法的一些代码示例,展示了MemcachedClient.shutdown()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MemcachedClient.shutdown()方法的具体详情如下:
包路径:net.spy.memcached.MemcachedClient
类名称:MemcachedClient
方法名:shutdown

MemcachedClient.shutdown介绍

[英]Shut down immediately.
[中]立即关闭。

代码示例

代码示例来源:origin: apache/hbase

@Override
public void shutdown() {
 client.shutdown();
}

代码示例来源:origin: jooby-project/jooby

public void destroy() {
 if (client != null) {
  client.shutdown(shutdownTimeout, TimeUnit.MILLISECONDS);
  client = null;
 }
}

代码示例来源:origin: brianfrankcooper/YCSB

@Override
public void cleanup() throws DBException {
 if (client != null) {
  memcachedClient().shutdown(shutdownTimeoutMillis, MILLISECONDS);
 }
}

代码示例来源:origin: ninjaframework/ninja

@Dispose
  public void stop() {
    client.shutdown();
  }
}

代码示例来源:origin: Netflix/EVCache

public Map<SocketAddress, Map<String, String>> getStats(String cmd) {
  if(config.isRendInstance()) {
    List<InetSocketAddress> udsproxyInetSocketAddress = new ArrayList<InetSocketAddress>(memcachedNodesInZone.size());
    for(InetSocketAddress address : memcachedNodesInZone) {
      udsproxyInetSocketAddress.add(new InetSocketAddress(address.getHostName(), config.getUdsproxyMemcachedPort()));
    }
    
    MemcachedClient mc = null;
    try {
      mc = new MemcachedClient(connectionFactory, udsproxyInetSocketAddress);
      return mc.getStats(cmd);
    } catch(Exception ex) {
      
    } finally {
      if(mc != null) mc.shutdown();
    }
    return Collections.<SocketAddress, Map<String, String>>emptyMap();
  } else {
    return evcacheMemcachedClient.getStats(cmd);
  }
}

代码示例来源:origin: magro/memcached-session-manager

@Override
public void shutdown() {
  _memcached.shutdown();
}

代码示例来源:origin: magro/memcached-session-manager

@AfterMethod
public void tearDown() throws Exception {
  mc.shutdown();
  mc = null;
  if(!couchbaseProvided) {
    tearDownCouchbase();
  }
  _tomcat1.stop();
}

代码示例来源:origin: magro/memcached-session-manager

@AfterMethod
public void tearDown() throws Exception {
  _client.shutdown();
  _httpClient.getConnectionManager().shutdown();
  _tomcat1.stop();
  _tomcat2.stop();
  _daemon.stop();
  if(_daemon2 != null)
    _daemon2.stop();
}

代码示例来源:origin: magro/memcached-session-manager

@AfterMethod
public void tearDown() throws Exception {
  _client.shutdown(10, SECONDS);
  _daemon1.stop();
  _daemon2.stop();
  if(_daemon3 != null && _daemon3.isRunning()) {
    _daemon3.stop();
  }
  _tomcat1.stop();
  _tomcat2.stop();
  _httpClient.getConnectionManager().shutdown();
  _executor.shutdownNow();
}

代码示例来源:origin: magro/memcached-session-manager

private void setupCouchbaseClient() throws URISyntaxException, IOException {
  if(mc != null) {
    LOG.info("Closing existing couchbase client.");
    mc.shutdown();
  }
  final List<URI> uris = getURIs();
  LOG.info("Creating new couchbase client with uris " + uris);
  mc = new CouchbaseClient(uris, "default", "");
}

代码示例来源:origin: com.google.code.maven-play-plugin.org.playframework/play

@Override
  public void stop() {
    client.shutdown();
  }
}

代码示例来源:origin: com.google.code.simple-spring-memcached/spymemcached

/**
 * Shut down immediately.
 */
public void shutdown() {
 shutdown(-1, TimeUnit.MILLISECONDS);
}

代码示例来源:origin: com.amazonaws/elasticache-java-cluster-client

/**
 * Shut down immediately.
 */
@Override
public void shutdown() {
 shutdown(-1, TimeUnit.MILLISECONDS);
}

代码示例来源:origin: yyuu/jetty-nosql-memcached

public boolean shutdown() throws KeyValueStoreClientException {
  if (_client != null) {
    _client.shutdown();
    _client = null;
  }
  return true;
}

代码示例来源:origin: naver/arcus-java-client

/**
 * Shut down immediately.
 */
public void shutdown() {
 shutdown(-1, TimeUnit.MILLISECONDS);
}

代码示例来源:origin: org.springframework.cloud/spring-cloud-aws-context

@Override
  protected void destroyConnectionClient(MemcachedClient connectionClient) {
    connectionClient.shutdown(10, TimeUnit.SECONDS);
  }
}

代码示例来源:origin: com.amazonaws/elasticache-java-cluster-client

@Override
public void destroy() throws Exception {
 if(shutdownTimeoutSeconds > 0) {
  client.shutdown(shutdownTimeoutSeconds, TimeUnit.SECONDS);
 } else {
  client.shutdown();
 }
}

代码示例来源:origin: com.google.code.simple-spring-memcached/spymemcached

public void connectionEstablished(SocketAddress sa, int reconnectCount) {
 if (authDescriptor != null) {
  if (authDescriptor.authThresholdReached()) {
   this.shutdown();
  }
  authMonitor.authConnection(mconn, opFact, authDescriptor, findNode(sa));
 }
}

代码示例来源:origin: net.spy/spymemcached

@Override
public void connectionEstablished(SocketAddress sa, int reconnectCount) {
 if (authDescriptor != null) {
  if (authDescriptor.authThresholdReached()) {
   shutdown();
  }
  authMonitor.authConnection(mconn, opFact, authDescriptor, findNode(sa));
 }
}

代码示例来源:origin: org.infinispan/infinispan-cli-server

@AfterMethod
public void release() {
 try {
   memcachedServer.stop();
   TestingUtil.killCacheManagers(cacheManager);
   memcachedClient.shutdown();
 } catch (Exception e) {
   e.printStackTrace();
 }
}
/* TODO: convert to new encoding

相关文章