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

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

本文整理了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

@Override
public CountDownLatch broadcastOp(final BroadcastOpFactory of,
  Collection<MemcachedNode> nodes) {
 return broadcastOp(of, nodes, true);
}

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

@Override
public CountDownLatch broadcastOp(final BroadcastOpFactory of,
  Collection<MemcachedNode> nodes) {
 return broadcastOp(of, nodes, true);
}

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

CountDownLatch broadcastOp(final BroadcastOpFactory of,
              Collection<MemcachedNode> nodes) {
 return broadcastOp(of, nodes, true);
}

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

public CountDownLatch broadcastOp(final BroadcastOpFactory of,
  Collection<MemcachedNode> nodes) {
 return broadcastOp(of, nodes, true);
}

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

CountDownLatch broadcastOp(final BroadcastOpFactory of,
    Collection<MemcachedNode> nodes) {
  return broadcastOp(of, nodes, true);
}

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

CountDownLatch broadcastOp(final BroadcastOpFactory of) {
  return broadcastOp(of, true);
}

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

/**
 * Wait for the queues to die down.
 *
 * @throws IllegalStateException in the rare circumstance where queue
 *         is too full to accept any more requests
 */
public boolean waitForQueues(long timeout, TimeUnit unit) {
  CountDownLatch blatch = broadcastOp(new BroadcastOpFactory(){
    public Operation newOp(final MemcachedNode n,
        final CountDownLatch latch) {
      return opFact.noop(
          new OperationCallback() {
            public void complete() {
              latch.countDown();
            }
            public void receivedStatus(OperationStatus s) {
              // Nothing special when receiving status, only
              // necessary to complete the interface
            }
          });
    }}, false);
  try {
    // XXX:  Perhaps IllegalStateException should be caught here
    // and the check retried.
    return blatch.await(timeout, unit);
  } catch (InterruptedException e) {
    throw new RuntimeException("Interrupted waiting for queues", e);
  }
}

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

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

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

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

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

public Set<String> listSaslMechanisms() {
 final ConcurrentMap<String, String> rv =
   new ConcurrentHashMap<String, String>();
 CountDownLatch blatch = broadcastOp(new BroadcastOpFactory() {
  public Operation newOp(MemcachedNode n, final CountDownLatch latch) {
   return opFact.saslMechs(new OperationCallback() {
    public void receivedStatus(OperationStatus status) {
     for (String s : status.getMessage().split(" ")) {
      rv.put(s, s);
     }
    }
    public void complete() {
     latch.countDown();
    }
   });
  }
 });
 try {
  blatch.await();
 } catch (InterruptedException e) {
  Thread.currentThread().interrupt();
 }
 return rv.keySet();
}

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

public Set<String> listSaslMechanisms() {
 final ConcurrentMap<String, String> rv
     = new ConcurrentHashMap<String, String>();
 CountDownLatch blatch = broadcastOp(new BroadcastOpFactory() {
  public Operation newOp(MemcachedNode n,
              final CountDownLatch latch) {
   return opFact.saslMechs(new OperationCallback() {
    public void receivedStatus(OperationStatus status) {
     for (String s : status.getMessage().split(" ")) {
      rv.put(s, s);
     }
    }
    public void complete() {
     latch.countDown();
    }
   });
  }
 });
 try {
  blatch.await();
 } catch (InterruptedException e) {
  Thread.currentThread().interrupt();
 }
 return rv.keySet();
}

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

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

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

public Set<String> listSaslMechanisms() {
  final ConcurrentMap<String, String> rv
    = new ConcurrentHashMap<String, String>();
  CountDownLatch blatch = broadcastOp(new BroadcastOpFactory() {
    public Operation newOp(MemcachedNode n,
        final CountDownLatch latch) {
      return opFact.saslMechs(new OperationCallback() {
        public void receivedStatus(OperationStatus status) {
          for(String s : status.getMessage().split(" ")) {
            rv.put(s, s);
          }
        }
        public void complete() {
          latch.countDown();
        }
      });
    }
  });
  try {
    blatch.await();
  } catch(InterruptedException e) {
    Thread.currentThread().interrupt();
  }
  return rv.keySet();
}

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

@Override
public Set<String> listSaslMechanisms() {
 final ConcurrentMap<String, String> rv =
   new ConcurrentHashMap<String, String>();
 CountDownLatch blatch = broadcastOp(new BroadcastOpFactory() {
  @Override
  public Operation newOp(MemcachedNode n, final CountDownLatch latch) {
   return opFact.saslMechs(new OperationCallback() {
    @Override
    public void receivedStatus(OperationStatus status) {
     for (String s : status.getMessage().split(" ")) {
      rv.put(s, s);
     }
    }
    @Override
    public void complete() {
     latch.countDown();
    }
   });
  }
 });
 try {
  blatch.await();
 } catch (InterruptedException e) {
  Thread.currentThread().interrupt();
 }
 return rv.keySet();
}

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

@Override
public Set<String> listSaslMechanisms() {
 final ConcurrentMap<String, String> rv =
   new ConcurrentHashMap<String, String>();
 CountDownLatch blatch = broadcastOp(new BroadcastOpFactory() {
  @Override
  public Operation newOp(MemcachedNode n, final CountDownLatch latch) {
   return opFact.saslMechs(new OperationCallback() {
    @Override
    public void receivedStatus(OperationStatus status) {
     for (String s : status.getMessage().split(" ")) {
      rv.put(s, s);
     }
    }
    @Override
    public void complete() {
     latch.countDown();
    }
   });
  }
 });
 try {
  blatch.await();
 } catch (InterruptedException e) {
  Thread.currentThread().interrupt();
 }
 return rv.keySet();
}

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

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

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

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

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

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

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

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

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

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

相关文章