本文整理了Java中net.spy.memcached.MemcachedClient.getLogger()
方法的一些代码示例,展示了MemcachedClient.getLogger()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MemcachedClient.getLogger()
方法的具体详情如下:
包路径:net.spy.memcached.MemcachedClient
类名称:MemcachedClient
方法名:getLogger
暂无
代码示例来源:origin: com.google.code.maven-play-plugin.spy/spymemcached
private void logRunException(Exception e) {
if(shuttingDown) {
// There are a couple types of errors that occur during the
// shutdown sequence that are considered OK. Log at debug.
getLogger().debug("Exception occurred during shutdown", e);
} else {
getLogger().warn("Problem handling memcached IO", e);
}
}
代码示例来源:origin: com.google.code.maven-play-plugin.spy/memcached
private void logRunException(Exception e) {
if(shuttingDown) {
// There are a couple types of errors that occur during the
// shutdown sequence that are considered OK. Log at debug.
getLogger().debug("Exception occurred during shutdown", e);
} else {
getLogger().warn("Problem handling memcached IO", e);
}
}
代码示例来源:origin: naver/arcus-java-client
private void logRunException(Exception e) {
if (shuttingDown) {
// There are a couple types of errors that occur during the
// shutdown sequence that are considered OK. Log at debug.
getLogger().debug("Exception occurred during shutdown", e);
} else {
getLogger().warn("Problem handling memcached IO", e);
}
}
代码示例来源:origin: naver/arcus-java-client
private long mutate(Mutator m, String key, int by, long def, int exp) {
final AtomicLong rv = new AtomicLong();
final CountDownLatch latch = new CountDownLatch(1);
addOp(key, opFact.mutate(m, key, by, def, exp, new OperationCallback() {
public void receivedStatus(OperationStatus s) {
// XXX: Potential abstraction leak.
// The handling of incr/decr in the binary protocol
// Allows us to avoid string processing.
rv.set(new Long(s.isSuccess() ? s.getMessage() : "-1"));
}
public void complete() {
latch.countDown();
}
}));
try {
if (!latch.await(operationTimeout, TimeUnit.MILLISECONDS)) {
throw new OperationTimeoutException(
"Mutate operation timed out, unable to modify counter ["
+ key + "]");
}
} catch (InterruptedException e) {
throw new RuntimeException("Interrupted", e);
}
getLogger().debug("Mutation returned %s", rv);
return rv.get();
}
代码示例来源:origin: com.google.code.maven-play-plugin.spy/memcached
private long mutate(Mutator m, String key, int by, long def, int exp) {
final AtomicLong rv=new AtomicLong();
final CountDownLatch latch=new CountDownLatch(1);
addOp(key, opFact.mutate(m, key, by, def, exp, new OperationCallback() {
public void receivedStatus(OperationStatus s) {
// XXX: Potential abstraction leak.
// The handling of incr/decr in the binary protocol
// Allows us to avoid string processing.
rv.set(new Long(s.isSuccess()?s.getMessage():"-1"));
}
public void complete() {
latch.countDown();
}}));
try {
if (!latch.await(operationTimeout, TimeUnit.MILLISECONDS)) {
throw new OperationTimeoutException(
"Mutate operation timed out, unable to modify counter ["
+ key + "]");
}
} catch (InterruptedException e) {
throw new RuntimeException("Interrupted", e);
}
getLogger().debug("Mutation returned %s", rv);
return rv.get();
}
代码示例来源:origin: com.google.code.maven-play-plugin.spy/spymemcached
private long mutate(Mutator m, String key, int by, long def, int exp) {
final AtomicLong rv=new AtomicLong();
final CountDownLatch latch=new CountDownLatch(1);
addOp(key, opFact.mutate(m, key, by, def, exp, new OperationCallback() {
public void receivedStatus(OperationStatus s) {
// XXX: Potential abstraction leak.
// The handling of incr/decr in the binary protocol
// Allows us to avoid string processing.
rv.set(new Long(s.isSuccess()?s.getMessage():"-1"));
}
public void complete() {
latch.countDown();
}}));
try {
if (!latch.await(operationTimeout, TimeUnit.MILLISECONDS)) {
throw new OperationTimeoutException(
"Mutate operation timed out, unable to modify counter ["
+ key + "]");
}
} catch (InterruptedException e) {
throw new RuntimeException("Interrupted", e);
}
getLogger().debug("Mutation returned %s", rv);
return rv.get();
}
代码示例来源:origin: com.google.code.simple-spring-memcached/spymemcached
private long mutate(Mutator m, String key, long by, long def, int exp) {
final AtomicLong rv = new AtomicLong();
final CountDownLatch latch = new CountDownLatch(1);
mconn.enqueueOperation(key, opFact.mutate(m, key, by, def, exp,
new OperationCallback() {
public void receivedStatus(OperationStatus s) {
// XXX: Potential abstraction leak.
// The handling of incr/decr in the binary protocol
// Allows us to avoid string processing.
rv.set(new Long(s.isSuccess() ? s.getMessage() : "-1"));
}
public void complete() {
latch.countDown();
}
}));
try {
if (!latch.await(operationTimeout, TimeUnit.MILLISECONDS)) {
throw new OperationTimeoutException("Mutate operation timed out,"
+ "unable to modify counter [" + key + "]");
}
} catch (InterruptedException e) {
throw new RuntimeException("Interrupted", e);
}
getLogger().debug("Mutation returned %s", rv);
return rv.get();
}
代码示例来源:origin: net.spy/spymemcached
private long mutate(Mutator m, String key, long by, long def, int exp) {
final AtomicLong rv = new AtomicLong();
final CountDownLatch latch = new CountDownLatch(1);
mconn.enqueueOperation(key, opFact.mutate(m, key, by, def, exp,
new OperationCallback() {
@Override
public void receivedStatus(OperationStatus s) {
// XXX: Potential abstraction leak.
// The handling of incr/decr in the binary protocol
// Allows us to avoid string processing.
rv.set(new Long(s.isSuccess() ? s.getMessage() : "-1"));
}
@Override
public void complete() {
latch.countDown();
}
}));
try {
if (!latch.await(operationTimeout, TimeUnit.MILLISECONDS)) {
throw new OperationTimeoutException("Mutate operation timed out,"
+ "unable to modify counter [" + key + ']');
}
} catch (InterruptedException e) {
throw new RuntimeException("Interrupted", e);
}
getLogger().debug("Mutation returned %s", rv);
return rv.get();
}
代码示例来源:origin: com.amazonaws/elasticache-java-cluster-client
private long mutate(Mutator m, String key, long by, long def, int exp) {
final AtomicLong rv = new AtomicLong();
final CountDownLatch latch = new CountDownLatch(1);
enqueueOperation(key, opFact.mutate(m, key, by, def, exp,
new OperationCallback() {
@Override
public void receivedStatus(OperationStatus s) {
// XXX: Potential abstraction leak.
// The handling of incr/decr in the binary protocol
// Allows us to avoid string processing.
rv.set(new Long(s.isSuccess() ? s.getMessage() : "-1"));
}
@Override
public void complete() {
latch.countDown();
}
}));
try {
if (!latch.await(operationTimeout, TimeUnit.MILLISECONDS)) {
throw new OperationTimeoutException("Mutate operation timed out,"
+ "unable to modify counter [" + key + ']');
}
} catch (InterruptedException e) {
throw new RuntimeException("Interrupted", e);
}
getLogger().debug("Mutation returned %s", rv);
return rv.get();
}
代码示例来源:origin: com.amazonaws/elasticache-java-cluster-client
getLogger().warn("Configuration endpoint timed out for config call. Leaving the initialization work to configuration poller.");
代码示例来源:origin: net.spy/spymemcached
getLogger().info("Suppressing duplicate attempt to shut down");
return false;
executorService.shutdown();
} catch (Exception ex) {
getLogger().warn("Failed shutting down the ExecutorService: ", ex);
getLogger().warn("exception while shutting down", e);
代码示例来源:origin: com.amazonaws/elasticache-java-cluster-client
getLogger().info("Suppressing duplicate attempt to shut down");
return false;
executorService.shutdown();
} catch (Exception ex) {
getLogger().warn("Failed shutting down the ExecutorService: ", ex);
getLogger().warn("exception while shutting down", e);
代码示例来源:origin: com.google.code.maven-play-plugin.spy/spymemcached
/**
* Infinitely loop processing IO.
*/
@Override
public void run() {
while(running) {
try {
conn.handleIO();
} catch(IOException e) {
logRunException(e);
} catch(CancelledKeyException e) {
logRunException(e);
} catch(ClosedSelectorException e) {
logRunException(e);
} catch(IllegalStateException e) {
logRunException(e);
}
}
getLogger().info("Shut down memcached client");
}
代码示例来源:origin: com.google.code.maven-play-plugin.spy/memcached
getLogger().info("Suppressing duplicate attempt to shut down");
return false;
tcService.shutdown();
} catch (IOException e) {
getLogger().warn("exception while shutting down", e);
代码示例来源:origin: com.google.code.maven-play-plugin.spy/memcached
/**
* Infinitely loop processing IO.
*/
@Override
public void run() {
while(running) {
try {
conn.handleIO();
} catch(IOException e) {
logRunException(e);
} catch(CancelledKeyException e) {
logRunException(e);
} catch(ClosedSelectorException e) {
logRunException(e);
} catch(IllegalStateException e) {
logRunException(e);
}
}
getLogger().info("Shut down memcached client");
}
代码示例来源:origin: naver/arcus-java-client
/**
* Infinitely loop processing IO.
*/
@Override
public void run() {
while (running) {
try {
conn.handleIO();
} catch (IOException e) {
logRunException(e);
} catch (CancelledKeyException e) {
logRunException(e);
} catch (ClosedSelectorException e) {
logRunException(e);
} catch (IllegalStateException e) {
logRunException(e);
}
}
getLogger().info("Shut down memcached client");
}
代码示例来源:origin: com.google.code.simple-spring-memcached/spymemcached
getLogger().info("Suppressing duplicate attempt to shut down");
return false;
tcService.shutdown();
} catch (IOException e) {
getLogger().warn("exception while shutting down", e);
代码示例来源:origin: com.google.code.maven-play-plugin.spy/spymemcached
getLogger().info("Suppressing duplicate attempt to shut down");
return false;
tcService.shutdown();
} catch (IOException e) {
getLogger().warn("exception while shutting down", e);
代码示例来源:origin: naver/arcus-java-client
getLogger().info("Suppressing duplicate attempt to shut down");
return false;
tcService.shutdown();
} catch (IOException e) {
getLogger().warn("exception while shutting down", e);
内容来源于网络,如有侵权,请联系作者删除!