Examples of ComponentStatus


Examples of org.infinispan.lifecycle.ComponentStatus

   }

   private Object handleAll(InvocationContext ctx, VisitableCommand command) throws Throwable {
      boolean suppressExceptions = false;

      ComponentStatus status = componentRegistry.getStatus();
      if (status.isTerminated()) {
         String cacheName = componentRegistry.getCacheName();
         String prefix = "Cache '" + cacheName + "'";
         if (cacheName.equals(CacheContainer.DEFAULT_CACHE_NAME))
            prefix = "Default cache";
         throw new IllegalStateException(prefix + " is in 'TERMINATED' state and so it does not accept new invocations. Either restart it or recreate the cache container.");
View Full Code Here

Examples of org.infinispan.lifecycle.ComponentStatus

   }

   private Object handleAll(InvocationContext ctx, VisitableCommand command) throws Throwable {
      boolean suppressExceptions = false;
      try {
         ComponentStatus status = componentRegistry.getStatus();
         if (command.ignoreCommandOnStatus(status)) {
            log.debugf("Status: %s : Ignoring %s command", status, command);
            return null;
         }

         if (status.isTerminated()) {
            throw new IllegalStateException(String.format(
                  "%s is in 'TERMINATED' state and so it does not accept new invocations. " +
                        "Either restart it or recreate the cache container.",
                  getCacheNamePrefix()));
         } else if (stoppingAndNotAllowed(status, ctx)) {
View Full Code Here

Examples of org.infinispan.lifecycle.ComponentStatus

   }

   private Object handleAll(InvocationContext ctx, VisitableCommand command) throws Throwable {
      boolean suppressExceptions = false;
      try {
      ComponentStatus status = componentRegistry.getStatus();
      if (command.ignoreCommandOnStatus(status)) {
         log.debugf("Status: %s : Ignoring %s command", status, command);
         return null;
      }

      if (status.isTerminated()) {
         throw new IllegalStateException(String.format(
               "%s is in 'TERMINATED' state and so it does not accept new invocations. " +
                     "Either restart it or recreate the cache container.",
               getCacheNamePrefix()));
      } else if (stoppingAndNotAllowed(status, ctx)) {
View Full Code Here

Examples of org.infinispan.lifecycle.ComponentStatus

   }

   private Object handleAll(InvocationContext ctx, VisitableCommand command) throws Throwable {
      boolean suppressExceptions = false;

      ComponentStatus status = componentRegistry.getStatus();
      if (status.isTerminated()) {
         throw new IllegalStateException(String.format(
               "%s is in 'TERMINATED' state and so it does not accept new invocations. " +
                     "Either restart it or recreate the cache container.",
               getCacheNamePrefix()));
      } else if (stoppingAndNotAllowed(status, ctx)) {
View Full Code Here

Examples of org.infinispan.lifecycle.ComponentStatus

   }

   private Object handleAll(InvocationContext ctx, VisitableCommand command) throws Throwable {
      boolean suppressExceptions = false;

      ComponentStatus status = componentRegistry.getStatus();
      if (status.isTerminated()) {
         throw new IllegalStateException(String.format(
               "%s is in 'TERMINATED' state and so it does not accept new invocations. " +
                     "Either restart it or recreate the cache container.",
               getCacheNamePrefix()));
      } else if (stoppingAndNotAllowed(status, ctx)) {
View Full Code Here

Examples of org.infinispan.lifecycle.ComponentStatus

   public TransactionalLockFactory(Cache<?, ?> cache, String indexName) {
      this.cache = cache;
      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 {
View Full Code Here

Examples of org.infinispan.lifecycle.ComponentStatus

   public TransactionalLockFactory(Cache cache, String indexName) {
      this.cache = cache;
      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 {
View Full Code Here

Examples of org.infinispan.lifecycle.ComponentStatus

   }

   private Object handleAll(InvocationContext ctx, VisitableCommand command) throws Throwable {
      boolean suppressExceptions = false;
      try {
         ComponentStatus status = componentRegistry.getStatus();
         if (command.ignoreCommandOnStatus(status)) {
            log.debugf("Status: %s : Ignoring %s command", status, command);
            return null;
         }

         if (status.isTerminated()) {
            throw new IllegalStateException(String.format(
                  "%s is in 'TERMINATED' state and so it does not accept new invocations. " +
                        "Either restart it or recreate the cache container.",
                  getCacheNamePrefix()));
         } else if (stoppingAndNotAllowed(status, ctx)) {
View Full Code Here

Examples of org.infinispan.lifecycle.ComponentStatus

      return retval == null ? false : retval;
   }

   private Object handleAll(InvocationContext ctx, VisitableCommand command) throws Throwable {
      try {
         ComponentStatus status = componentRegistry.getStatus();
         if (command.ignoreCommandOnStatus(status)) {
            log.debugf("Status: %s : Ignoring %s command", status, command);
            return null;
         }

         if (status.isTerminated()) {
            throw new IllegalStateException(String.format(
                  "%s is in 'TERMINATED' state and so it does not accept new invocations. " +
                        "Either restart it or recreate the cache container.",
                  getCacheNamePrefix()));
         } else if (stoppingAndNotAllowed(status, ctx)) {
View Full Code Here

Examples of org.infinispan.lifecycle.ComponentStatus

   public TransactionalLockFactory(Cache cache, String indexName) {
      this.cache = cache;
      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 {
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.