Examples of CacheLoaderException


Examples of javax.cache.integration.CacheLoaderException

   private Exceptions(){
   }

   static RuntimeException launderCacheLoaderException(Exception e) {
      if (!(e instanceof CacheLoaderException))
         return new CacheLoaderException("Exception in CacheLoader", e);

      return new PersistenceException(e);
   }
View Full Code Here

Examples of org.infinispan.loader.CacheLoaderException

      s3Bucket.clear();
   }

   CacheLoaderException convertToCacheLoaderException(String message, Exception caught) {
      return (caught instanceof CacheLoaderException) ? (CacheLoaderException) caught :
            new CacheLoaderException(message, caught);
   }
View Full Code Here

Examples of org.infinispan.loaders.CacheLoaderException

      if (!(isCacheReady() && isLocalCall())) return null;
      ClusteredGetCommand clusteredGetCommand = new ClusteredGetCommand(key, cache.getName());
      List<Response> response = doRemoteCall(clusteredGetCommand);
      if (response.isEmpty()) return null;
      if (response.size() > 1)
         throw new CacheLoaderException("Response length is always 0 or 1, received: " + response);
      Response firstResponse = response.get(0);
      if (firstResponse.isSuccessful() && firstResponse instanceof SuccessfulResponse) {
         return (InternalCacheEntry) ((SuccessfulResponse) firstResponse).getResponseValue();
      }

      String message = "Unknown response from remote cache: " + response;
      log.error(message);
      throw new CacheLoaderException(message);
   }
View Full Code Here

Examples of org.infinispan.loaders.CacheLoaderException

      ResponseFilter filter = new ClusteredGetResponseValidityFilter(validMembers);
      try {
         return rpcManager.invokeRemotely(null, clusteredGetCommand, ResponseMode.WAIT_FOR_VALID_RESPONSE, config.getRemoteCallTimeout(), false, filter);
      } catch (Exception e) {
         log.error("error while doing remote call", e);
         throw new CacheLoaderException(e);
      }
   }
View Full Code Here

Examples of org.infinispan.loaders.CacheLoaderException

   @Override
   public void start() throws CacheLoaderException {
      super.start();
      if (configuration == null) {
        throw new CacheLoaderException("Null config. Possible reason is not calling super.init(...)");
      }
      log.tracef("Starting cache with config: %s", configuration);

      locks = new StripedLock(configuration.lockConcurrencyLevel());
      globalLockTimeoutMillis = configuration.lockAcquistionTimeout();
View Full Code Here

Examples of org.infinispan.loaders.CacheLoaderException

   }

   @Override
   public final Set<InternalCacheEntry> loadAll() throws CacheLoaderException {
      if (!acquireGlobalLock(false)) {
         throw new CacheLoaderException("Unable to acquire global lock");
      }
      try {
         return loadAllLockSafe();
      } finally {
         releaseGlobalLock(false);
View Full Code Here

Examples of org.infinispan.loaders.CacheLoaderException

   public final Set<InternalCacheEntry> load(int maxEntries) throws CacheLoaderException {
      if (maxEntries < 0) {
         return loadAll();
      }
      if (!acquireGlobalLock(false)) {
         throw new CacheLoaderException("Unable to acquire global lock");
      }
      try {
         return loadLockSafe(maxEntries);
      } finally {
         releaseGlobalLock(false);
View Full Code Here

Examples of org.infinispan.loaders.CacheLoaderException

   }

   @Override
   public Set<Object> loadAllKeys(Set<Object> keysToExclude) throws CacheLoaderException {
      if (!acquireGlobalLock(false)) {
         throw new CacheLoaderException("Unable to acquire global lock");
      }
      try {
         return loadAllKeysLockSafe(keysToExclude);
      } finally {
         releaseGlobalLock(false);
View Full Code Here

Examples of org.infinispan.loaders.CacheLoaderException

   }

   @Override
   public final void fromStream(ObjectInput objectInput) throws CacheLoaderException {
      if (!acquireGlobalLock(true)) {
         throw new CacheLoaderException("Unable to acquire global lock");
      }
      try {
         fromStreamLockSafe(objectInput);
      } finally {
         releaseGlobalLock(true);
View Full Code Here

Examples of org.infinispan.loaders.CacheLoaderException

   }

   @Override
   public void toStream(ObjectOutput objectOutput) throws CacheLoaderException {
      if (!acquireGlobalLock(false)) {
         throw new CacheLoaderException("Unable to acquire global lock");
      }
      try {
         toStreamLockSafe(objectOutput);
      } finally {
         releaseGlobalLock(false);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.