Package org.infinispan.commons

Examples of org.infinispan.commons.CacheConfigurationException


   }

   @Override
   public void validate() {
      if (chunkSize <= 0) {
         throw new CacheConfigurationException("chunkSize can not be <= 0");
      }

      if (awaitInitialTransfer != null && awaitInitialTransfer
            && !getClusteringBuilder().cacheMode().isReplicated() && !getClusteringBuilder().cacheMode().isDistributed())
         throw new CacheConfigurationException(
               "awaitInitialTransfer can be enabled only if cache mode is distributed or replicated.");
   }
View Full Code Here


         return (T) new CancellationServiceImpl();
      else if (componentType.equals(TimeService.class)) {
         return (T) new DefaultTimeService();
      }

      throw new CacheConfigurationException("Don't know how to create a " + componentType.getName());
   }
View Full Code Here

                        ExecutorServiceType.BLOCKING);
               }
            }
            return (T) totalOrderExecutor;
         } else {
            throw new CacheConfigurationException("Unknown named executor " + componentName);
         }
      } catch (CacheConfigurationException ce) {
         throw ce;
      } catch (Exception e) {
         throw new CacheConfigurationException("Unable to instantiate ExecutorFactory for named component " + componentName, e);
      }
   }
View Full Code Here

   @Override
   public void validate() {
      super.validate();
      if (binaryTable.tableNamePrefix.equals(stringTable.tableNamePrefix))
         throw new CacheConfigurationException("There cannot be the same tableNamePrefix on both the binary and " +
               "String tables.");

   }
View Full Code Here

    */
   public static <T> Class<T> loadClass(String classname, ClassLoader cl) {
      try {
         return loadClassStrict(classname, cl);
      } catch (ClassNotFoundException e) {
         throw new CacheConfigurationException("Unable to instantiate class " + classname, e);
      }
   }
View Full Code Here

    */
   public static <T> T getInstance(Class<T> clazz) {
      try {
         return getInstanceStrict(clazz);
      } catch (IllegalAccessException iae) {
         throw new CacheConfigurationException("Unable to instantiate class " + clazz.getName(), iae);
      } catch (InstantiationException ie) {
         throw new CacheConfigurationException("Unable to instantiate class " + clazz.getName(), ie);
      }
   }
View Full Code Here

   }

   @Override
   public void validate() {
      if (connectionUrl == null) {
         throw new CacheConfigurationException("Missing connectionUrl parameter");
      }
   }
View Full Code Here

               }
               invokeInjectionMethod(target, injectMetadata);
            }
         }
      } catch (Exception e) {
         throw new CacheConfigurationException("Unable to configure component (type: " + target.getClass() + ", instance " + target + ")", e);
      }
   }
View Full Code Here

      if (AutoInstantiableFactory.class.isAssignableFrom(factory)) {
         try {
            return (AbstractComponentFactory) factory.newInstance();
         } catch (Exception e) {
            // unable to get a hold of an instance!!
            throw new CacheConfigurationException("Unable to instantiate factory " + factory + "  Debug stack: " + debugStack, e);
         }
      } else {
         throw new CacheConfigurationException("Cannot auto-instantiate factory " + factory + " as it doesn't implement " + AutoInstantiableFactory.class.getSimpleName() + "!  Debug stack: " + debugStack);
      }
   }
View Full Code Here

   }

   protected void throwStackAwareConfigurationException(String message) {
      if (debugStack == null) {
         throw new CacheConfigurationException(message + ". To get more detail set the system property " + DEPENDENCIES_ENABLE_JVMOPTION + " to true");
      } else {
         throw new CacheConfigurationException(message + " Debug stack: " + debugStack);
      }
   }
View Full Code Here

TOP

Related Classes of org.infinispan.commons.CacheConfigurationException

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.