Examples of ReplaceOperation


Examples of com.github.fge.jsonpatch.ReplaceOperation

      if (operation instanceof RemoveOperation) {

        // Replace remove operation with replace operation and a value of null.
        JsonPointer path = (JsonPointer) ReflectionUtils.getField(PATH_FIELD, operation);
        patchedNode = new ReplaceOperation(path, NullNode.getInstance()).apply(patchedNode);

      } else {
        patchedNode = operation.apply(patchedNode);
      }
    }
View Full Code Here

Examples of com.hazelcast.map.impl.operation.ReplaceOperation

        invalidateNearCache(key);
        return replaceSuccessful;
    }

    protected Data replaceInternal(final Data key, final Data value) {
        ReplaceOperation operation = new ReplaceOperation(name, key, value);
        final Data result = (Data) invokeOperation(key, operation);
        invalidateNearCache(key);
        return result;
    }
View Full Code Here

Examples of com.hazelcast.map.impl.operation.ReplaceOperation

    public int getClassId() {
        return MapPortableHook.REPLACE;
    }

    protected Operation prepareOperation() {
        ReplaceOperation op = new ReplaceOperation(name, key, value);
        op.setThreadId(threadId);
        return op;
    }
View Full Code Here

Examples of com.hazelcast.map.operation.ReplaceOperation

        invalidateNearCache(key);
        return replaceSuccessful;
    }

    protected Data replaceInternal(final Data key, final Data value) {
        ReplaceOperation operation = new ReplaceOperation(name, key, value);
        final Data result = (Data) invokeOperation(key, operation);
        invalidateNearCache(key);
        return result;
    }
View Full Code Here

Examples of com.hazelcast.map.operation.ReplaceOperation

    public int getClassId() {
        return MapPortableHook.REPLACE;
    }

    protected Operation prepareOperation() {
        ReplaceOperation op = new ReplaceOperation(name, key, value);
        op.setThreadId(threadId);
        return op;
    }
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

   @Override
   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.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
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.