Examples of PutIfAbsentOperation


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

        invalidateNearCache(key);
        return putSuccessful;
    }

    protected Data putIfAbsentInternal(final Data key, final Data value, final long ttl, final TimeUnit timeunit) {
        PutIfAbsentOperation operation = new PutIfAbsentOperation(name, key, value, getTimeInMillis(ttl, timeunit));
        Data previousValue = (Data) invokeOperation(key, operation);
        invalidateNearCache(key);
        return previousValue;
    }
View Full Code Here

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

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

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

Examples of com.hazelcast.map.operation.PutIfAbsentOperation

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

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

Examples of com.hazelcast.map.operation.PutIfAbsentOperation

        invalidateNearCache(key);
        return putSuccessful;
    }

    protected Data putIfAbsentInternal(final Data key, final Data value, final long ttl, final TimeUnit timeunit) {
        PutIfAbsentOperation operation = new PutIfAbsentOperation(name, key, value, getTimeInMillis(ttl, timeunit));
        Data previousValue = (Data) invokeOperation(key, operation);
        invalidateNearCache(key);
        return previousValue;
    }
View Full Code Here

Examples of com.hazelcast.map.operation.PutIfAbsentOperation

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

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

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

   public V putIfAbsent(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);
      PutIfAbsentOperation op = operationsFactory.newPutIfAbsentOperation(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.PutIfAbsentOperation

   @Override
   public V putIfAbsent(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) {
      assertRemoteCacheManagerIsStarted();
      int lifespanSecs = toSeconds(lifespan, lifespanUnit);
      int maxIdleSecs = toSeconds(maxIdleTime, maxIdleTimeUnit);
      PutIfAbsentOperation op = operationsFactory.newPutIfAbsentOperation(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.PutIfAbsentOperation

   @SuppressWarnings("unchecked")
   public V putIfAbsent(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) {
      assertRemoteCacheManagerIsStarted();
      int lifespanSecs = toSeconds(lifespan, lifespanUnit);
      int maxIdleSecs = toSeconds(maxIdleTime, maxIdleTimeUnit);
      PutIfAbsentOperation op = operationsFactory.newPutIfAbsentOperation(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.PutIfAbsentOperation

   public V putIfAbsent(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);
      PutIfAbsentOperation op = operationsFactory.newPutIfAbsentOperation(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.PutIfAbsentOperation

   public V putIfAbsent(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);
      PutIfAbsentOperation op = operationsFactory.newPutIfAbsentOperation(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.