Package org.infinispan

Examples of org.infinispan.CacheException


      try {
         byteBuffer = marshaller.objectToByteBuffer(x);
         return (T) marshaller.objectFromByteBuffer(byteBuffer);
      } catch (InterruptedException e) {
         Thread.currentThread().interrupt();
         throw new CacheException(e);     
      } catch (Exception e) {
         throw new CacheException(e);
      }    
   }
View Full Code Here


   public static CacheException rewrapAsCacheException(Throwable t) {
      if (t instanceof CacheException)
         return (CacheException) t;
      else
         return new CacheException(t);
   }
View Full Code Here

      } finally {
         if (tx != null) {
            try {
               tm.resume(tx);
            } catch (Exception e) {
               throw new CacheException("Unable to resume suspended transaction " + tx, e);
            }
         }
      }
      return locked;
   }
View Full Code Here

      } finally {
         if (tx != null) {
            try {
               tm.resume(tx);
            } catch (Exception e) {
               throw new CacheException("Unable to resume suspended transaction " + tx, e);
            }
         }
      }
   }
View Full Code Here

            ext = idViaAnnotationObjExt;
         } else if (object instanceof IdViaBothObj){
            output.write(2);
            ext = idViaBothObjExt;
         } else {
            throw new CacheException(String.format(
                  "Object of type %s is not supported by externalizer %s",
                  object.getClass().getName(), this.getClass().getName()));
         }
         ext.writeObject(output, object);
      }
View Full Code Here

               break;
            case 2:
               ext = idViaBothObjExt;
               break;
            default:
               throw new CacheException(String.format(
                     "Unknown index (%d) for externalizer %s",
                     index, this.getClass().getName()));
         }
         return ext.readObject(input);
      }
View Full Code Here

      this.indexName = indexName;
      tm = cache.getAdvancedCache().getTransactionManager();
      if (tm == null) {
         ComponentStatus status = cache.getAdvancedCache().getComponentRegistry().getStatus();
         if (status.equals(ComponentStatus.RUNNING)) {
            throw new CacheException(
                     "Failed looking up TransactionManager. Check if any transaction manager is associated with Infinispan cache: \'"
                              + cache.getName() + "\'");
         }
         else {
            throw new CacheException("Failed looking up TransactionManager: the cache is not running");
         }
      }
      defLock = new TransactionalSharedLuceneLock(cache, indexName, DEF_LOCK_NAME, tm);
   }
View Full Code Here

         Object key = getKey(msg);
         log.infof("Received invalidation message[%s] for key=%s, remove from cache",
                   msg.getJMSMessageID(), key);
         cache.remove(key);
      } catch (Exception e) {
         throw new CacheException("Unable to process remote cache event", e);
      }
   }
View Full Code Here

            } else {
               executeCommandFromLocalCluster(cmd, req, response, preserveOrder);
            }
         } catch (InterruptedException e) {
            log.shutdownHandlingCommand(cmd);
            reply(response, new ExceptionResponse(new CacheException("Cache is shutting down")));
         } catch (Throwable x) {
            if (cmd == null)
               log.errorUnMarshallingCommand(x);
            else
               log.exceptionHandlingCommand(cmd, x);
            reply(response, new ExceptionResponse(new CacheException("Problems invoking command.", x)));
         }
      } else {
         reply(response, null);
      }
   }
View Full Code Here

            try {
               Object retVal = backupReceiverRepository.handleRemoteCommand((SingleRpcCommand) cmd, src);
               reply(response, retVal);
            } catch (InterruptedException e) {
               log.shutdownHandlingCommand(cmd);
               reply(response, new ExceptionResponse(new CacheException("Cache is shutting down")));
            } catch (Throwable throwable) {
               log.exceptionHandlingCommand(cmd, throwable);
               reply(response, new ExceptionResponse(new CacheException("Problems invoking command.", throwable)));
            }
         }
      });
   }
View Full Code Here

TOP

Related Classes of org.infinispan.CacheException

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.