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

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

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

MemcachedClient.broadcastOp介绍

暂无

代码示例

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

  1. @Override
  2. public CountDownLatch broadcastOp(final BroadcastOpFactory of,
  3. Collection<MemcachedNode> nodes) {
  4. return broadcastOp(of, nodes, true);
  5. }

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

  1. @Override
  2. public CountDownLatch broadcastOp(final BroadcastOpFactory of,
  3. Collection<MemcachedNode> nodes) {
  4. return broadcastOp(of, nodes, true);
  5. }

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

  1. CountDownLatch broadcastOp(final BroadcastOpFactory of,
  2. Collection<MemcachedNode> nodes) {
  3. return broadcastOp(of, nodes, true);
  4. }

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

  1. public CountDownLatch broadcastOp(final BroadcastOpFactory of,
  2. Collection<MemcachedNode> nodes) {
  3. return broadcastOp(of, nodes, true);
  4. }

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

  1. CountDownLatch broadcastOp(final BroadcastOpFactory of,
  2. Collection<MemcachedNode> nodes) {
  3. return broadcastOp(of, nodes, true);
  4. }

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

  1. CountDownLatch broadcastOp(final BroadcastOpFactory of) {
  2. return broadcastOp(of, true);
  3. }

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

  1. /**
  2. * Wait for the queues to die down.
  3. *
  4. * @throws IllegalStateException in the rare circumstance where queue
  5. * is too full to accept any more requests
  6. */
  7. public boolean waitForQueues(long timeout, TimeUnit unit) {
  8. CountDownLatch blatch = broadcastOp(new BroadcastOpFactory(){
  9. public Operation newOp(final MemcachedNode n,
  10. final CountDownLatch latch) {
  11. return opFact.noop(
  12. new OperationCallback() {
  13. public void complete() {
  14. latch.countDown();
  15. }
  16. public void receivedStatus(OperationStatus s) {
  17. // Nothing special when receiving status, only
  18. // necessary to complete the interface
  19. }
  20. });
  21. }}, false);
  22. try {
  23. // XXX: Perhaps IllegalStateException should be caught here
  24. // and the check retried.
  25. return blatch.await(timeout, unit);
  26. } catch (InterruptedException e) {
  27. throw new RuntimeException("Interrupted waiting for queues", e);
  28. }
  29. }

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

  1. CountDownLatch blatch = broadcastOp(new BroadcastOpFactory() {
  2. public Operation newOp(final MemcachedNode n,
  3. final CountDownLatch latch) {

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

  1. CountDownLatch blatch = broadcastOp(new BroadcastOpFactory(){
  2. public Operation newOp(final MemcachedNode n,
  3. final CountDownLatch latch) {

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

  1. public Set<String> listSaslMechanisms() {
  2. final ConcurrentMap<String, String> rv =
  3. new ConcurrentHashMap<String, String>();
  4. CountDownLatch blatch = broadcastOp(new BroadcastOpFactory() {
  5. public Operation newOp(MemcachedNode n, final CountDownLatch latch) {
  6. return opFact.saslMechs(new OperationCallback() {
  7. public void receivedStatus(OperationStatus status) {
  8. for (String s : status.getMessage().split(" ")) {
  9. rv.put(s, s);
  10. }
  11. }
  12. public void complete() {
  13. latch.countDown();
  14. }
  15. });
  16. }
  17. });
  18. try {
  19. blatch.await();
  20. } catch (InterruptedException e) {
  21. Thread.currentThread().interrupt();
  22. }
  23. return rv.keySet();
  24. }

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

  1. public Set<String> listSaslMechanisms() {
  2. final ConcurrentMap<String, String> rv
  3. = new ConcurrentHashMap<String, String>();
  4. CountDownLatch blatch = broadcastOp(new BroadcastOpFactory() {
  5. public Operation newOp(MemcachedNode n,
  6. final CountDownLatch latch) {
  7. return opFact.saslMechs(new OperationCallback() {
  8. public void receivedStatus(OperationStatus status) {
  9. for (String s : status.getMessage().split(" ")) {
  10. rv.put(s, s);
  11. }
  12. }
  13. public void complete() {
  14. latch.countDown();
  15. }
  16. });
  17. }
  18. });
  19. try {
  20. blatch.await();
  21. } catch (InterruptedException e) {
  22. Thread.currentThread().interrupt();
  23. }
  24. return rv.keySet();
  25. }

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

  1. new ConcurrentHashMap<SocketAddress, String>();
  2. CountDownLatch blatch = broadcastOp(new BroadcastOpFactory(){
  3. public Operation newOp(final MemcachedNode n,
  4. final CountDownLatch latch) {

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

  1. public Set<String> listSaslMechanisms() {
  2. final ConcurrentMap<String, String> rv
  3. = new ConcurrentHashMap<String, String>();
  4. CountDownLatch blatch = broadcastOp(new BroadcastOpFactory() {
  5. public Operation newOp(MemcachedNode n,
  6. final CountDownLatch latch) {
  7. return opFact.saslMechs(new OperationCallback() {
  8. public void receivedStatus(OperationStatus status) {
  9. for(String s : status.getMessage().split(" ")) {
  10. rv.put(s, s);
  11. }
  12. }
  13. public void complete() {
  14. latch.countDown();
  15. }
  16. });
  17. }
  18. });
  19. try {
  20. blatch.await();
  21. } catch(InterruptedException e) {
  22. Thread.currentThread().interrupt();
  23. }
  24. return rv.keySet();
  25. }

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

  1. @Override
  2. public Set<String> listSaslMechanisms() {
  3. final ConcurrentMap<String, String> rv =
  4. new ConcurrentHashMap<String, String>();
  5. CountDownLatch blatch = broadcastOp(new BroadcastOpFactory() {
  6. @Override
  7. public Operation newOp(MemcachedNode n, final CountDownLatch latch) {
  8. return opFact.saslMechs(new OperationCallback() {
  9. @Override
  10. public void receivedStatus(OperationStatus status) {
  11. for (String s : status.getMessage().split(" ")) {
  12. rv.put(s, s);
  13. }
  14. }
  15. @Override
  16. public void complete() {
  17. latch.countDown();
  18. }
  19. });
  20. }
  21. });
  22. try {
  23. blatch.await();
  24. } catch (InterruptedException e) {
  25. Thread.currentThread().interrupt();
  26. }
  27. return rv.keySet();
  28. }

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

  1. @Override
  2. public Set<String> listSaslMechanisms() {
  3. final ConcurrentMap<String, String> rv =
  4. new ConcurrentHashMap<String, String>();
  5. CountDownLatch blatch = broadcastOp(new BroadcastOpFactory() {
  6. @Override
  7. public Operation newOp(MemcachedNode n, final CountDownLatch latch) {
  8. return opFact.saslMechs(new OperationCallback() {
  9. @Override
  10. public void receivedStatus(OperationStatus status) {
  11. for (String s : status.getMessage().split(" ")) {
  12. rv.put(s, s);
  13. }
  14. }
  15. @Override
  16. public void complete() {
  17. latch.countDown();
  18. }
  19. });
  20. }
  21. });
  22. try {
  23. blatch.await();
  24. } catch (InterruptedException e) {
  25. Thread.currentThread().interrupt();
  26. }
  27. return rv.keySet();
  28. }

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

  1. @Override
  2. public CountDownLatch broadcastOp(final BroadcastOpFactory of) {
  3. return broadcastOp(of, mconn.getLocator().getAll(), true);
  4. }

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

  1. @Override
  2. public CountDownLatch broadcastOp(final BroadcastOpFactory of) {
  3. return broadcastOp(of, mconn.getLocator().getAll(), true);
  4. }

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

  1. public CountDownLatch broadcastOp(final BroadcastOpFactory of) {
  2. return broadcastOp(of, mconn.getLocator().getAll(), true);
  3. }

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

  1. protected CountDownLatch broadcastOp(final BroadcastOpFactory of) {
  2. return broadcastOp(of, conn.getLocator().getAll(), true);
  3. }

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

  1. CountDownLatch broadcastOp(final BroadcastOpFactory of) {
  2. return broadcastOp(of, conn.getLocator().getAll(), true);
  3. }

相关文章