Package org.infinispan.cli

Examples of org.infinispan.cli.Context


      // bunched up. This is valid in shell mode, but a bit problematic for
      // the cache loader. So, instead create a context instance for each
      // operation. This is obviously not very efficient, but this cache loader
      // should only be used during migration, so any inefficiencies should
      // only be temporary.
      Context cliCtx = createContext();
      Command command = cliCtx.getCommandRegistry().getCommand(parsed.getCommand());
      command.execute(cliCtx, parsed);
      ResponseMatcher.Result result = ((ResponseMatcher) cliCtx.getOutputAdapter())
            .getResult(Collections.singletonList(parsed));
      if (result.isError)
         throw new CacheException("Unable to load entry: " + result.result);

      if (result.result.equals("null"))
View Full Code Here


      return ctx.getMarshalledEntryFactory().newMarshalledEntry(key, value, null);
   }

   private Context createContext() {
      ResponseMatcher responseMatcher = new ResponseMatcher();
      Context cliCtx = new ContextImpl(responseMatcher, new CommandBufferImpl());
      cliCtx.setConnection(connection);
      return cliCtx;
   }
View Full Code Here

      // bunched up. This is valid in shell mode, but a bit problematic for
      // the cache loader. So, instead create a context instance for each
      // operation. This is obviously not very efficient, but this cache loader
      // should only be used during migration, so any inefficiencies should
      // only be temporary.
      Context cliCtx = createContext();
      Command command = cliCtx.getCommandRegistry().getCommand(parsed.getCommand());
      command.execute(cliCtx, parsed);
      ResponseMatcher.Result result = ((ResponseMatcher) cliCtx.getOutputAdapter())
            .getResult(Collections.singletonList(parsed));
      if (result.isError)
         throw new CacheException("Unable to load entry: " + result.result);

      if (result.result.equals("null"))
View Full Code Here

      return ctx.getMarshalledEntryFactory().newMarshalledEntry(key, value, null);
   }

   private Context createContext() {
      ResponseMatcher responseMatcher = new ResponseMatcher();
      Context cliCtx = new ContextImpl(responseMatcher, new CommandBufferImpl());
      cliCtx.setConnection(connection);
      return cliCtx;
   }
View Full Code Here

TOP

Related Classes of org.infinispan.cli.Context

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.