Package org.infinispan.client.hotrod.impl.transport

Examples of org.infinispan.client.hotrod.impl.transport.Transport


   private <K, V> PingResult ping(RemoteCacheImpl<K, V> cache) {
      if (transportFactory == null) {
         return PingResult.FAIL;
      }

      Transport transport = transportFactory.getTransport();
      try {
         return cache.ping(transport);
      } finally {
        transportFactory.releaseTransport(transport);
      }
View Full Code Here


   @Override
   public T execute() {
      int retryCount = 0;
      while (shouldRetry(retryCount)) {
         Transport transport = null;
         try {
            // Transport retrieval should be retried
            transport = getTransport(retryCount);
            return executeOperation(transport);
         } catch (TransportException te) {
View Full Code Here

   @Override
   public T execute() {
      int retryCount = 0;
      while (shouldRetry(retryCount)) {
         Transport transport = null;
         try {
            // Transport retrieval should be retried
            transport = getTransport(retryCount);
            return executeOperation(transport);
         } catch (TransportException te) {
View Full Code Here

   private <K, V> PingResult ping(RemoteCacheImpl<K, V> cache) {
      if (transportFactory == null) {
         return PingResult.FAIL;
      }

      Transport transport = transportFactory.getTransport();
      try {
         return cache.ping(transport);
      } finally {
        transportFactory.releaseTransport(transport);
      }
View Full Code Here

   private <K, V> PingResult ping(RemoteCacheImpl<K, V> cache) {
      if (transportFactory == null) {
         return PingResult.FAIL;
      }

      Transport transport = transportFactory.getTransport();
      try {
         return cache.ping(transport);
      } finally {
        transportFactory.releaseTransport(transport);
      }
View Full Code Here

   @Override
   public T execute() {
      int retryCount = 0;
      while (shouldRetry(retryCount)) {
         Transport transport = null;
         try {
            // Transport retrieval should be retried
            transport = getTransport(retryCount);
            return executeOperation(transport);
         } catch (TransportException te) {
View Full Code Here

   @Override
   public T execute() {
      int retryCount = 0;
      while (shouldRetry(retryCount)) {
         Transport transport = null;
         try {
            // Transport retrieval should be retried
            transport = getTransport(retryCount);
            return executeOperation(transport);
         } catch (TransportException te) {
View Full Code Here

      this.transportFactory = transportFactory;
      this.topologyId = topologyId;
   }

   public byte[] get(byte[] key, Flag[] flags) {
      Transport transport = transportFactory.getTransport(key);
      try {
         short status = sendKeyOperation(key, transport, GET_REQUEST, flags, GET_RESPONSE);
         if (status == KEY_DOES_NOT_EXIST_STATUS) {
            return null;
         }
         if (status == NO_ERROR_STATUS) {
            return transport.readArray();
         }
      } finally {
         releaseTransport(transport);
      }
      throw new IllegalStateException("We should not reach here!");
View Full Code Here

      }
      throw new IllegalStateException("We should not reach here!");
   }

   public byte[] remove(byte[] key, Flag[] flags) {
      Transport transport = transportFactory.getTransport(key);
      try {
         short status = sendKeyOperation(key, transport, REMOVE_REQUEST, flags, REMOVE_RESPONSE);
         if (status == KEY_DOES_NOT_EXIST_STATUS) {
            return null;
         } else if (status == NO_ERROR_STATUS) {
View Full Code Here

      }
      throw new IllegalStateException("We should not reach here!");
   }

   public boolean containsKey(byte[] key, Flag... flags) {
      Transport transport = transportFactory.getTransport(key);
      try {
         short status = sendKeyOperation(key, transport, CONTAINS_KEY_REQUEST, flags, CONTAINS_KEY_RESPONSE);
         if (status == KEY_DOES_NOT_EXIST_STATUS) {
            return false;
         } else if (status == NO_ERROR_STATUS) {
View Full Code Here

TOP

Related Classes of org.infinispan.client.hotrod.impl.transport.Transport

Copyright © 2018 www.massapicom. 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.