Package org.infinispan.client.hotrod.exceptions

Examples of org.infinispan.client.hotrod.exceptions.TransportException


   public short readByte() {
      int resultInt;
      try {
         resultInt = socket.getInputStream().read();
      } catch (IOException e) {
         throw new TransportException(e);
      }
      if (resultInt == -1) {
         throw new TransportException("End of stream reached!");
      }
      return (short) resultInt;
   }
View Full Code Here


            if (log.isTraceEnabled()) {
               log.trace("Offset: " + offset + ", len=" + len + ", size=" + size);
            }
            read = socket.getInputStream().read(result, offset, len);
         } catch (IOException e) {
            throw new TransportException(e);
         }
         if (read == -1) {
            throw new RuntimeException("End of stream reached!");
         }
         if (read + offset == size) {
View Full Code Here

      try {
         return (Transport) connectionPool.borrowObject(server);
      } catch (Exception e) {
         String message = "Could not fetch transport";
         log.error(message, e);
         throw new TransportException(message, e);
      } finally {
         logConnectionInfo(server);
      }
   }
View Full Code Here

      // Wait until the connection attempt succeeds or fails.
      channel = future.awaitUninterruptibly().getChannel();
      if (!future.isSuccess()) {
         bootstrap.releaseExternalResources();
         throw new TransportException("Could not create netty transport", future.getCause());
      }
   }
View Full Code Here

   @Override
   public void flush() {
      try {
         lastWrite.await();
      } catch (InterruptedException e) {
         throw new TransportException(e);
      }
   }
View Full Code Here

         socket = socketChannel.socket();
         socket.setTcpNoDelay(transportFactory.isTcpNoDelay());
      } catch (IOException e) {
         String message = "Could not connect to server: " + serverAddress;
         log.error(message, e);
         throw new TransportException(message, e);
      }
   }
View Full Code Here

         VHelper.writeVInt(vInt, socket.getOutputStream());
         if (log.isTraceEnabled())
            log.trace("VInt wrote " + vInt);
        
      } catch (IOException e) {
         throw new TransportException(e);
      }
   }
View Full Code Here

         VHelper.writeVLong(l, socket.getOutputStream());
         if (log.isTraceEnabled())
            log.trace("VLong wrote " + l);       

      } catch (IOException e) {
         throw new TransportException(e);
      }
   }
View Full Code Here

         long result = VHelper.readVLong(socket.getInputStream());
         if (log.isTraceEnabled())
            log.trace("VLong read " + result);
         return result;
      } catch (IOException e) {
         throw new TransportException(e);
      }
   }
View Full Code Here

         int result = VHelper.readVInt(socket.getInputStream());
         if (log.isTraceEnabled())
            log.trace("VInt read " + result);
         return result;
      } catch (IOException e) {
         throw new TransportException(e);
      }
   }
View Full Code Here

TOP

Related Classes of org.infinispan.client.hotrod.exceptions.TransportException

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.