Examples of BinaryConnectionFactory


Examples of net.spy.memcached.BinaryConnectionFactory

*/
@Test
public class BinaryMemcachedActionTests extends AbstractMemcachedActionsTests {

    @Override protected MemcachedClient createMemcachedClient() throws IOException {
        return new MemcachedClient(new BinaryConnectionFactory(), AddrUtil.getAddresses("localhost:11211"));
    }
View Full Code Here

Examples of net.spy.memcached.BinaryConnectionFactory

    public ResponseStore createStore() {
        try {
            if (getServers().size() == 0) {
                return ResponseStore.NULL_STORE;
            } else {
                MemcachedClient client = new MemcachedClient(new BinaryConnectionFactory(), getServers());
                return new MemcachedResponseStore(client, _keyPrefix, _readOnly);
            }
        } catch (IOException ex) {
            throw Throwables.propagate(ex);
        }
View Full Code Here

Examples of net.spy.memcached.BinaryConnectionFactory

   
    boolean isbinary = args[1].isEmpty() ? false : new Boolean(args[1].itemAt(0).getStringValue());
   
    MemcachedClient client;
    try {
      client = isbinary ? new MemcachedClient(new BinaryConnectionFactory(), ialist) : new MemcachedClient(ialist);
    } catch (IOException e) {
      throw new XPathException("Can't connect to memcahed server(s)");
    }
   
    // store the client and return the handle of the one.
View Full Code Here

Examples of net.spy.memcached.BinaryConnectionFactory

   /**
    * {@inheritDoc}
    */
   public ConnectionFactory create()
   {
      return new BinaryConnectionFactory(queueLength, bufferSize, hash == null ? DefaultConnectionFactory.DEFAULT_HASH
         : DefaultHashAlgorithm.valueOf(hash));
   }
View Full Code Here

Examples of net.spy.memcached.BinaryConnectionFactory

            ObjectParameter op = params.getObjectParam(CONNECTION_FACTORY_CREATOR);
            if (op == null || op.getObject() == null)
            {
               LOG.debug("No connection factory creator has been defined, "
                  + "so we will use the BinaryConnectionFactory by default");
               return new MemcachedClient(new BinaryConnectionFactory(), isaLocations);
            }
            else if (!(op.getObject() instanceof ConnectionFactoryCreator))
            {
               throw new IllegalArgumentException("The parameter '" + CONNECTION_FACTORY_CREATOR
                  + "' must refer to a ConnectionFactoryCreator.");
View Full Code Here

Examples of net.spy.memcached.BinaryConnectionFactory

    @Override
    protected MemcachedClient createMemcachedClient() throws IOException {
        int port = getPort(randomInt(cluster().size()-1));
        logger.info("  --> Testing Thrift on port [{}]", port);
        return new MemcachedClient(new BinaryConnectionFactory(), AddrUtil.getAddresses("localhost:" + port));
    }
View Full Code Here

Examples of net.spy.memcached.BinaryConnectionFactory

                                .build();
            }
            else {
                return memcachedNodesManager.isEncodeNodeIdInSessionId() ? new SuffixLocatorBinaryConnectionFactory( memcachedNodesManager,
                        memcachedNodesManager.getSessionIdFormat(),
                        statistics, operationTimeout, maxReconnectDelay ) : new BinaryConnectionFactory() {
                    @Override
                    public long getOperationTimeout() {
                        return operationTimeout;
                    }
                    @Override
View Full Code Here

Examples of net.spy.memcached.BinaryConnectionFactory

     * @param maxQueueSize - Max number of items allowed in the queue
     * @param readTimeout - The timeout for all read operations
     */
    protected AbstractEVCacheClientImpl(String appName, String zone, int id, int maxQueueSize, DynamicIntProperty readTimeout) {
        this(appName, zone, id, readTimeout,
                new BinaryConnectionFactory(maxQueueSize, DefaultConnectionFactory.DEFAULT_READ_BUFFER_SIZE, DefaultHashAlgorithm.KETAMA_HASH));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.