Package org.infinispan.client.hotrod.exceptions

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


      InputStream stream = null;
      try {
         stream = config.openStream();
         loadFromStream(stream);
      } catch (IOException e) {
         throw new HotRodClientException("Could not read URL:" + config, e);
      } finally {
         try {
            if (stream != null)
               stream.close();
         } catch (IOException e) {
View Full Code Here


   private void loadFromStream(InputStream stream) {
      Properties properties = new Properties();
      try {
         properties.load(stream);
      } catch (IOException e) {
         throw new HotRodClientException("Issues configuring from client hotrod-client.properties", e);
      }
      config = new ConfigurationProperties(properties);
      forceReturnValueDefault = config.getForceReturnValues();
   }
View Full Code Here

      try {
         ObjectOutputStream oos = new ObjectOutputStream(result);
         oos.writeObject(toMarshall);
         return result.toByteArray();
      } catch (IOException e) {
         throw new HotRodClientException("Unexpected!", e);
      }
   }
View Full Code Here

   public Object readObject(byte[] bytes) {
      try {
         ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bytes));
         return ois.readObject();
      } catch (Exception e) {
         throw new HotRodClientException("Unexpected!", e);
      }
   }
View Full Code Here

         case UNKNOWN_VERSION_STATUS: {
            String msgFromServer = transport.readString();
            if (log.isWarnEnabled()) {
               log.warn("Error status received from the server:" + msgFromServer + " for message id " + messageId);
            }
            throw new HotRodClientException(msgFromServer, messageId, status);
         }
         case COMMAND_TIMEOUT_STATUS: {
            if (log.isTraceEnabled()) {
               log.trace("timeout message received from the server");
            }
View Full Code Here

    */
   public RemoteCacheManager(URL config, boolean start) {
      try {
         loadFromStream(config.openStream());
      } catch (IOException e) {
         throw new HotRodClientException("Could not read URL:" + config, e);
      }
      if (start)
         start();
   }
View Full Code Here

   private void loadFromStream(InputStream stream) {
      props = new Properties();
      try {
         props.load(stream);
      } catch (IOException e) {
         throw new HotRodClientException("Issues configuring from client hotrod-client.properties",e);
      }
   }
View Full Code Here

      try {
         stream = config.openStream();
         Properties properties = loadFromStream(stream);
         configuration = new ConfigurationBuilder().classLoader(classLoader).withProperties(properties).build();
      } catch (IOException e) {
         throw new HotRodClientException("Could not read URL:" + config, e);
      } finally {
         try {
            if (stream != null)
               stream.close();
         } catch (IOException e) {
View Full Code Here

   private Properties loadFromStream(InputStream stream) {
      Properties properties = new Properties();
      try {
         properties.load(stream);
      } catch (IOException e) {
         throw new HotRodClientException("Issues configuring from client hotrod-client.properties", e);
      }
      return properties;
   }
View Full Code Here

   private byte[] obj2bytes(Object o, boolean isKey) {
      try {
         return marshaller.objectToByteBuffer(o, isKey ? estimateKeySize : estimateValueSize);
      } catch (IOException ioe) {
         throw new HotRodClientException(
               "Unable to marshall object of type [" + o.getClass().getName() + "]", ioe);
      } catch (InterruptedException ie) {
         Thread.currentThread().interrupt();
         return null;
      }
View Full Code Here

TOP

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

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.