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

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

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

MemcachedClient.getLogger介绍

暂无

代码示例

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

  1. private void logRunException(Exception e) {
  2. if(shuttingDown) {
  3. // There are a couple types of errors that occur during the
  4. // shutdown sequence that are considered OK. Log at debug.
  5. getLogger().debug("Exception occurred during shutdown", e);
  6. } else {
  7. getLogger().warn("Problem handling memcached IO", e);
  8. }
  9. }

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

  1. private void logRunException(Exception e) {
  2. if(shuttingDown) {
  3. // There are a couple types of errors that occur during the
  4. // shutdown sequence that are considered OK. Log at debug.
  5. getLogger().debug("Exception occurred during shutdown", e);
  6. } else {
  7. getLogger().warn("Problem handling memcached IO", e);
  8. }
  9. }

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

  1. private void logRunException(Exception e) {
  2. if (shuttingDown) {
  3. // There are a couple types of errors that occur during the
  4. // shutdown sequence that are considered OK. Log at debug.
  5. getLogger().debug("Exception occurred during shutdown", e);
  6. } else {
  7. getLogger().warn("Problem handling memcached IO", e);
  8. }
  9. }

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

  1. private long mutate(Mutator m, String key, int by, long def, int exp) {
  2. final AtomicLong rv = new AtomicLong();
  3. final CountDownLatch latch = new CountDownLatch(1);
  4. addOp(key, opFact.mutate(m, key, by, def, exp, new OperationCallback() {
  5. public void receivedStatus(OperationStatus s) {
  6. // XXX: Potential abstraction leak.
  7. // The handling of incr/decr in the binary protocol
  8. // Allows us to avoid string processing.
  9. rv.set(new Long(s.isSuccess() ? s.getMessage() : "-1"));
  10. }
  11. public void complete() {
  12. latch.countDown();
  13. }
  14. }));
  15. try {
  16. if (!latch.await(operationTimeout, TimeUnit.MILLISECONDS)) {
  17. throw new OperationTimeoutException(
  18. "Mutate operation timed out, unable to modify counter ["
  19. + key + "]");
  20. }
  21. } catch (InterruptedException e) {
  22. throw new RuntimeException("Interrupted", e);
  23. }
  24. getLogger().debug("Mutation returned %s", rv);
  25. return rv.get();
  26. }

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

  1. private long mutate(Mutator m, String key, int by, long def, int exp) {
  2. final AtomicLong rv=new AtomicLong();
  3. final CountDownLatch latch=new CountDownLatch(1);
  4. addOp(key, opFact.mutate(m, key, by, def, exp, new OperationCallback() {
  5. public void receivedStatus(OperationStatus s) {
  6. // XXX: Potential abstraction leak.
  7. // The handling of incr/decr in the binary protocol
  8. // Allows us to avoid string processing.
  9. rv.set(new Long(s.isSuccess()?s.getMessage():"-1"));
  10. }
  11. public void complete() {
  12. latch.countDown();
  13. }}));
  14. try {
  15. if (!latch.await(operationTimeout, TimeUnit.MILLISECONDS)) {
  16. throw new OperationTimeoutException(
  17. "Mutate operation timed out, unable to modify counter ["
  18. + key + "]");
  19. }
  20. } catch (InterruptedException e) {
  21. throw new RuntimeException("Interrupted", e);
  22. }
  23. getLogger().debug("Mutation returned %s", rv);
  24. return rv.get();
  25. }

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

  1. private long mutate(Mutator m, String key, int by, long def, int exp) {
  2. final AtomicLong rv=new AtomicLong();
  3. final CountDownLatch latch=new CountDownLatch(1);
  4. addOp(key, opFact.mutate(m, key, by, def, exp, new OperationCallback() {
  5. public void receivedStatus(OperationStatus s) {
  6. // XXX: Potential abstraction leak.
  7. // The handling of incr/decr in the binary protocol
  8. // Allows us to avoid string processing.
  9. rv.set(new Long(s.isSuccess()?s.getMessage():"-1"));
  10. }
  11. public void complete() {
  12. latch.countDown();
  13. }}));
  14. try {
  15. if (!latch.await(operationTimeout, TimeUnit.MILLISECONDS)) {
  16. throw new OperationTimeoutException(
  17. "Mutate operation timed out, unable to modify counter ["
  18. + key + "]");
  19. }
  20. } catch (InterruptedException e) {
  21. throw new RuntimeException("Interrupted", e);
  22. }
  23. getLogger().debug("Mutation returned %s", rv);
  24. return rv.get();
  25. }

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

  1. private long mutate(Mutator m, String key, long by, long def, int exp) {
  2. final AtomicLong rv = new AtomicLong();
  3. final CountDownLatch latch = new CountDownLatch(1);
  4. mconn.enqueueOperation(key, opFact.mutate(m, key, by, def, exp,
  5. new OperationCallback() {
  6. public void receivedStatus(OperationStatus s) {
  7. // XXX: Potential abstraction leak.
  8. // The handling of incr/decr in the binary protocol
  9. // Allows us to avoid string processing.
  10. rv.set(new Long(s.isSuccess() ? s.getMessage() : "-1"));
  11. }
  12. public void complete() {
  13. latch.countDown();
  14. }
  15. }));
  16. try {
  17. if (!latch.await(operationTimeout, TimeUnit.MILLISECONDS)) {
  18. throw new OperationTimeoutException("Mutate operation timed out,"
  19. + "unable to modify counter [" + key + "]");
  20. }
  21. } catch (InterruptedException e) {
  22. throw new RuntimeException("Interrupted", e);
  23. }
  24. getLogger().debug("Mutation returned %s", rv);
  25. return rv.get();
  26. }

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

  1. private long mutate(Mutator m, String key, long by, long def, int exp) {
  2. final AtomicLong rv = new AtomicLong();
  3. final CountDownLatch latch = new CountDownLatch(1);
  4. mconn.enqueueOperation(key, opFact.mutate(m, key, by, def, exp,
  5. new OperationCallback() {
  6. @Override
  7. public void receivedStatus(OperationStatus s) {
  8. // XXX: Potential abstraction leak.
  9. // The handling of incr/decr in the binary protocol
  10. // Allows us to avoid string processing.
  11. rv.set(new Long(s.isSuccess() ? s.getMessage() : "-1"));
  12. }
  13. @Override
  14. public void complete() {
  15. latch.countDown();
  16. }
  17. }));
  18. try {
  19. if (!latch.await(operationTimeout, TimeUnit.MILLISECONDS)) {
  20. throw new OperationTimeoutException("Mutate operation timed out,"
  21. + "unable to modify counter [" + key + ']');
  22. }
  23. } catch (InterruptedException e) {
  24. throw new RuntimeException("Interrupted", e);
  25. }
  26. getLogger().debug("Mutation returned %s", rv);
  27. return rv.get();
  28. }

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

  1. private long mutate(Mutator m, String key, long by, long def, int exp) {
  2. final AtomicLong rv = new AtomicLong();
  3. final CountDownLatch latch = new CountDownLatch(1);
  4. enqueueOperation(key, opFact.mutate(m, key, by, def, exp,
  5. new OperationCallback() {
  6. @Override
  7. public void receivedStatus(OperationStatus s) {
  8. // XXX: Potential abstraction leak.
  9. // The handling of incr/decr in the binary protocol
  10. // Allows us to avoid string processing.
  11. rv.set(new Long(s.isSuccess() ? s.getMessage() : "-1"));
  12. }
  13. @Override
  14. public void complete() {
  15. latch.countDown();
  16. }
  17. }));
  18. try {
  19. if (!latch.await(operationTimeout, TimeUnit.MILLISECONDS)) {
  20. throw new OperationTimeoutException("Mutate operation timed out,"
  21. + "unable to modify counter [" + key + ']');
  22. }
  23. } catch (InterruptedException e) {
  24. throw new RuntimeException("Interrupted", e);
  25. }
  26. getLogger().debug("Mutation returned %s", rv);
  27. return rv.get();
  28. }

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

  1. getLogger().warn("Configuration endpoint timed out for config call. Leaving the initialization work to configuration poller.");

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

  1. getLogger().info("Suppressing duplicate attempt to shut down");
  2. return false;
  3. executorService.shutdown();
  4. } catch (Exception ex) {
  5. getLogger().warn("Failed shutting down the ExecutorService: ", ex);
  6. getLogger().warn("exception while shutting down", e);

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

  1. getLogger().info("Suppressing duplicate attempt to shut down");
  2. return false;
  3. executorService.shutdown();
  4. } catch (Exception ex) {
  5. getLogger().warn("Failed shutting down the ExecutorService: ", ex);
  6. getLogger().warn("exception while shutting down", e);

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

  1. /**
  2. * Infinitely loop processing IO.
  3. */
  4. @Override
  5. public void run() {
  6. while(running) {
  7. try {
  8. conn.handleIO();
  9. } catch(IOException e) {
  10. logRunException(e);
  11. } catch(CancelledKeyException e) {
  12. logRunException(e);
  13. } catch(ClosedSelectorException e) {
  14. logRunException(e);
  15. } catch(IllegalStateException e) {
  16. logRunException(e);
  17. }
  18. }
  19. getLogger().info("Shut down memcached client");
  20. }

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

  1. getLogger().info("Suppressing duplicate attempt to shut down");
  2. return false;
  3. tcService.shutdown();
  4. } catch (IOException e) {
  5. getLogger().warn("exception while shutting down", e);

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

  1. /**
  2. * Infinitely loop processing IO.
  3. */
  4. @Override
  5. public void run() {
  6. while(running) {
  7. try {
  8. conn.handleIO();
  9. } catch(IOException e) {
  10. logRunException(e);
  11. } catch(CancelledKeyException e) {
  12. logRunException(e);
  13. } catch(ClosedSelectorException e) {
  14. logRunException(e);
  15. } catch(IllegalStateException e) {
  16. logRunException(e);
  17. }
  18. }
  19. getLogger().info("Shut down memcached client");
  20. }

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

  1. /**
  2. * Infinitely loop processing IO.
  3. */
  4. @Override
  5. public void run() {
  6. while (running) {
  7. try {
  8. conn.handleIO();
  9. } catch (IOException e) {
  10. logRunException(e);
  11. } catch (CancelledKeyException e) {
  12. logRunException(e);
  13. } catch (ClosedSelectorException e) {
  14. logRunException(e);
  15. } catch (IllegalStateException e) {
  16. logRunException(e);
  17. }
  18. }
  19. getLogger().info("Shut down memcached client");
  20. }

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

  1. getLogger().info("Suppressing duplicate attempt to shut down");
  2. return false;
  3. tcService.shutdown();
  4. } catch (IOException e) {
  5. getLogger().warn("exception while shutting down", e);

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

  1. getLogger().info("Suppressing duplicate attempt to shut down");
  2. return false;
  3. tcService.shutdown();
  4. } catch (IOException e) {
  5. getLogger().warn("exception while shutting down", e);

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

  1. getLogger().info("Suppressing duplicate attempt to shut down");
  2. return false;
  3. tcService.shutdown();
  4. } catch (IOException e) {
  5. getLogger().warn("exception while shutting down", e);

相关文章