Package org.infinispan.commands.module

Examples of org.infinispan.commands.module.ModuleCommandFactory


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


         for (Map.Entry<String, ModuleProperties> module: p.entrySet()) {
            String factClass = module.getValue().getCommandFactoryClassName();
            String initClass = module.getValue().getCommandInitializerClassName();
            if (factClass != null && initClass != null) {
               try {
                  ModuleCommandFactory fact = (ModuleCommandFactory) Util.getInstance(factClass, cl);
                  Class<? extends ModuleCommandInitializer> initClazz = Util.loadClass(initClass, cl);
                  for (Map.Entry<Byte, Class<? extends ReplicableCommand>> entry: fact.getModuleCommands().entrySet()) {
                     byte id = entry.getKey();
                     if (commandFactories.containsKey(id))
                        throw new IllegalArgumentException("Module " + module.getKey() + " cannot use id " + id + " for commands, as it is already in use by " + commandFactories.get(id).getClass().getName());
                     commandFactories.put(id, fact);
                     commandInitializers.put(id, initClazz);
View Full Code Here

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

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

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

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

         for (Map.Entry<String, ModuleProperties> module : p.entrySet()) {
            String factClass = module.getValue().getCommandFactoryClassName();
            String initClass = module.getValue().getCommandInitializerClassName();
            if (factClass != null && initClass != null) {
               try {
                  ModuleCommandFactory fact = (ModuleCommandFactory) Util.getInstance(factClass, cl);
                  Class<? extends ModuleCommandInitializer> initClazz = Util.loadClass(initClass, cl);
                  for (Map.Entry<Byte, Class<? extends ReplicableCommand>> entry : fact.getModuleCommands().entrySet()) {
                     byte id = entry.getKey();
                     if (commandFactories.containsKey(id))
                        throw new IllegalArgumentException("Module " + module.getKey() + " cannot use id " + id + " for commands, as it is already in use by " + commandFactories.get(id).getClass().getName());
                     commandFactories.put(id, fact);
                     commandInitializers.put(id, initClazz);
View Full Code Here

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

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

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

TOP

Related Classes of org.infinispan.commands.module.ModuleCommandFactory

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.