Examples of ReplaceOperation


Examples of org.infinispan.client.hotrod.impl.operations.ReplaceOperation

   public V replace(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) {
      assertRemoteCacheManagerIsStarted();
      int lifespanSecs = toSeconds(lifespan, lifespanUnit);
      int maxIdleSecs = toSeconds(maxIdleTime, maxIdleTimeUnit);
      applyDefaultExpirationFlags(lifespan, maxIdleTime);
      ReplaceOperation op = operationsFactory.newReplaceOperation(obj2bytes(key, true), obj2bytes(value, false), lifespanSecs, maxIdleSecs);
      byte[] bytes = op.execute();
      return (V) bytes2obj(bytes);
   }
View Full Code Here

Examples of org.infinispan.client.hotrod.impl.operations.ReplaceOperation

   public V replace(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) {
      assertRemoteCacheManagerIsStarted();
      int lifespanSecs = toSeconds(lifespan, lifespanUnit);
      int maxIdleSecs = toSeconds(maxIdleTime, maxIdleTimeUnit);
      applyDefaultExpirationFlags(lifespan, maxIdleTime);
      ReplaceOperation op = operationsFactory.newReplaceOperation(obj2bytes(key, true), obj2bytes(value, false), lifespanSecs, maxIdleSecs);
      byte[] bytes = op.execute();
      return (V) bytes2obj(bytes);
   }
View Full Code Here

Examples of org.infinispan.client.hotrod.impl.operations.ReplaceOperation

   public V replace(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) {
      assertRemoteCacheManagerIsStarted();
      int lifespanSecs = toSeconds(lifespan, lifespanUnit);
      int maxIdleSecs = toSeconds(maxIdleTime, maxIdleTimeUnit);
      applyDefaultExpirationFlags(lifespan, maxIdleTime);
      ReplaceOperation op = operationsFactory.newReplaceOperation(obj2bytes(key, true), obj2bytes(value, false), lifespanSecs, maxIdleSecs);
      byte[] bytes = op.execute();
      return (V) bytes2obj(bytes);
   }
View Full Code Here

Examples of org.infinispan.client.hotrod.impl.operations.ReplaceOperation

   @SuppressWarnings("unchecked")
   public V replace(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) {
      assertRemoteCacheManagerIsStarted();
      int lifespanSecs = toSeconds(lifespan, lifespanUnit);
      int maxIdleSecs = toSeconds(maxIdleTime, maxIdleTimeUnit);
      ReplaceOperation op = operationsFactory.newReplaceOperation(obj2bytes(key, true), obj2bytes(value, false), lifespanSecs, maxIdleSecs);
      byte[] bytes = (byte[]) op.execute();
      return (V) bytes2obj(bytes);
   }
View Full Code Here

Examples of org.infinispan.client.hotrod.impl.operations.ReplaceOperation

   public V replace(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) {
      assertRemoteCacheManagerIsStarted();
      int lifespanSecs = toSeconds(lifespan, lifespanUnit);
      int maxIdleSecs = toSeconds(maxIdleTime, maxIdleTimeUnit);
      applyDefaultExpirationFlags(lifespan, maxIdleTime);
      ReplaceOperation op = operationsFactory.newReplaceOperation(obj2bytes(key, true), obj2bytes(value, false), lifespanSecs, maxIdleSecs);
      byte[] bytes = op.execute();
      return (V) bytes2obj(bytes);
   }
View Full Code Here

Examples of org.infinispan.client.hotrod.impl.operations.ReplaceOperation

   @SuppressWarnings("unchecked")
   public V replace(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) {
      assertRemoteCacheManagerIsStarted();
      int lifespanSecs = toSeconds(lifespan, lifespanUnit);
      int maxIdleSecs = toSeconds(maxIdleTime, maxIdleTimeUnit);
      ReplaceOperation op = operationsFactory.newReplaceOperation(obj2bytes(key, true), obj2bytes(value, false), lifespanSecs, maxIdleSecs);
      byte[] bytes = (byte[]) op.execute();
      return (V) bytes2obj(bytes);
   }
View Full Code Here

Examples of org.infinispan.client.hotrod.impl.operations.ReplaceOperation

   @SuppressWarnings("unchecked")
   public V replace(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) {
      assertRemoteCacheManagerIsStarted();
      int lifespanSecs = toSeconds(lifespan, lifespanUnit);
      int maxIdleSecs = toSeconds(maxIdleTime, maxIdleTimeUnit);
      ReplaceOperation op = operationsFactory.newReplaceOperation(obj2bytes(key, true), obj2bytes(value, false), lifespanSecs, maxIdleSecs);
      byte[] bytes = (byte[]) op.execute();
      return (V) bytes2obj(bytes);
   }
View Full Code Here

Examples of org.openengsb.core.ekb.transformation.wonderland.internal.operation.ReplaceOperation

        addOperation(new ToLowerOperation("toLower"));
        addOperation(new ToUpperOperation("toUpper"));
        addOperation(new SubStringOperation("substring"));
        addOperation(new ValueOperation("value"));
        addOperation(new LengthOperation("length"));
        addOperation(new ReplaceOperation("replace"));
        addOperation(new ReverseOperation("reverse"));
        addOperation(new RemoveLeadingOperation("removeleading"));
        addOperation(new PadOperation("pad"));
        addOperation(new InstantiateOperation("instantiate", new TestModelRegistry()));
    }
View Full Code Here

Examples of org.rstudio.core.client.regex.Pattern.ReplaceOperation

      // NOTE: the 4 spaces comes from the implementation of printtab2buff
      // in deparse.c -- it is hard-coded to use 4 spaces for the first 4
      // levels of indentation and then 2 spaces for subsequent levels.
      final String replaceWith = replaceText;
      Pattern pattern = Pattern.create("^(    ){1,4}");
      code = pattern.replaceAll(code, new ReplaceOperation()
      {
         @Override
         public String replace(Match m)
         {
            return m.getValue().replace("    ", replaceWith);
         }
      });
      Pattern pattern2 = Pattern.create("^\t{4}(  )+");
      code = pattern2.replaceAll(code, new ReplaceOperation()
      {
         @Override
         public String replace(Match m)
         {
            return m.getValue().replace("  ",  replaceWith);
View Full Code Here

Examples of org.rstudio.core.client.regex.Pattern.ReplaceOperation

      }

      public String getSweaveChunkText(final Scope chunk, Range range)
      {
         String text = docDisplay_.getCode(range.getStart(), range.getEnd());
         return Pattern.create("^<<(.*?)>>.*").replaceAll(text, new ReplaceOperation()
         {
            @Override
            public String replace(Match m)
            {
               String label = m.getGroup(1).trim();
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.