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

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


         }
      }
   }

   public Map<String, String> stats() {
      Transport transport = transportFactory.getTransport();
      try {
         // 1) write header
         long messageId = HotRodOperationsHelper.writeHeader(transport, STATS_REQUEST, cacheName, topologyId);
         HotRodOperationsHelper.readHeaderAndValidate(transport, messageId, STATS_RESPONSE, topologyId);
         int nrOfStats = transport.readVInt();

         Map<String, String> result = new HashMap<String, String>();
         for (int i = 0; i < nrOfStats; i++) {
            String statName = transport.readString();
            String statValue = transport.readString();
            result.put(statName, statValue);
         }
         return result;
      } finally {
         releaseTransport(transport);
View Full Code Here


   @Override
   public Object 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;
      Set<SocketAddress> failedServers = null;
      while (shouldRetry(retryCount)) {
         Transport transport = null;
         try {
            // Transport retrieval should be retried
            transport = getTransport(retryCount, failedServers);
            return executeOperation(transport);
         } catch (TransportException te) {
View Full Code Here

   @Override
   public Object execute() {
      byte[] listenerId = listenerNotifier.findListenerId(listener);
      if (listenerId != null) {
         SocketAddress address = listenerNotifier.findTransport(listenerId).getRemoteSocketAddress();
         Transport transport = transportFactory.getAddressTransport(address);
         try {
            HeaderParams params = writeHeader(transport, REMOVE_CLIENT_LISTENER_REQUEST);
            transport.writeArray(listenerId);
            transport.flush();
            short status = readHeaderAndValidate(transport, params);
            if (status == NO_ERROR_STATUS)
               listenerNotifier.removeClientListener(listenerId);
         } finally {
            transportFactory.releaseTransport(transport);
View Full Code Here

   @Override
   public Object 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

   @Override
   public Object execute() {
      int retryCount = 0;
      while (shouldRetry(retryCount)) {
         Transport transport = getTransport(retryCount);
         try {
            return executeOperation(transport);
         } catch (TransportException te) {
            logErrorAndThrowExceptionIfNeeded(retryCount, te);
         } finally {
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

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.