Package org.infinispan.commons

Examples of org.infinispan.commons.CacheException


               break;
            case CancelCommand.COMMAND_ID:
               command = new CancelCommand(cacheName);
               break;
            default:
               throw new CacheException("Unknown command id " + id + "!");
         }
      } else {
         ExtendedModuleCommandFactory mcf = (ExtendedModuleCommandFactory) commandFactories.get(id);
         if (mcf != null)
            return mcf.fromStream(id, parameters, cacheName);
         else
            throw new CacheException("Unknown command id " + id + "!");
      }
      command.setParameters(id, parameters);
      return command;
   }
View Full Code Here


      try {
         for (Thread thread : threads) {
            thread.join(defaultConfiguration.locking().lockAcquisitionTimeout());
         }
      } catch (InterruptedException e) {
         throw new CacheException("Interrupted while waiting for the caches to start");
      }

      return this;
   }
View Full Code Here

            cmd.perform(null);

            // Remove cache configuration and remove it from the computed cache name list
            configurationOverrides.remove(cacheName);
         } catch (Throwable t) {
            throw new CacheException("Error removing cache", t);
         }
      }
   }
View Full Code Here

         try {
            transactionManager.begin();
            clear(null, null);
            transactionManager.commit();
         } catch (Throwable e) {
            throw new CacheException(e);
         }
      } else {
         clear(null, null);
      }
   }
View Full Code Here

      //If the transaction was injected then we should not have it associated to caller's thread, but with the async thread
      try {
         if (isTxInjected(ctx))
            transactionManager.suspend();
      } catch (SystemException e) {
         throw new CacheException(e);
      }
      return ctx;
   }
View Full Code Here

               transactionManager.begin();
               transaction = transactionManager.getTransaction();
               txInjected = true;
               if (trace) log.trace("Implicit transaction started!");
            } catch (Exception e) {
               throw new CacheException("Could not start transaction", e);
            }
         }
         invocationContext = getInvocationContext(transaction, explicitClassLoader);
      } else {
         invocationContext = getInvocationContextForWrite(explicitClassLoader, keyCount, isPutForExternalRead);
View Full Code Here

               transaction = batchContainer.getBatchTransaction();
            }
         }
         return transaction;
      } catch (SystemException e) {
         throw new CacheException("Unable to get transaction", e);
      }
   }
View Full Code Here

            log.tracef("Committing transaction as it was implicit: %s", getOngoingTransaction());
         try {
            transactionManager.commit();
         } catch (Throwable e) {
            log.couldNotCompleteInjectedTransaction(e);
            throw new CacheException("Could not commit implicit transaction", e);
         }
      }

      return result;
   }
View Full Code Here

         isSerializationContextInitialized = true;
         try {
            SerializationContext serCtx = SerializationContextHolder.getSerializationContext();
            MarshallerRegistration.registerMarshallers(serCtx);
         } catch (IOException e) {
            throw new CacheException("Failed to initialise serialization context", e);
         } catch (Descriptors.DescriptorValidationException e) {
            throw new CacheException("Failed to initialise serialization context", e);
         }
      }
   }
View Full Code Here

   @Override
   public byte[] query(AdvancedCache<byte[], byte[]> cache, byte[] query) {
      try {
         return executeQuery(cache, query);
      } catch (IOException e) {
         throw new CacheException("An exception has occurred during query execution", e);
      }
   }
View Full Code Here

TOP

Related Classes of org.infinispan.commons.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.