Package org.infinispan.atomic

Examples of org.infinispan.atomic.DeltaAware


            key, entryValue, entryValue == null, true, ctx, this);

      if (value instanceof Delta) {
         // magic
         Delta dv = (Delta) value;
         DeltaAware toMergeWith = null;
         if (entryValue instanceof DeltaAware) toMergeWith = (DeltaAware) entryValue;
         e.setValue(dv.merge(toMergeWith));
         o = entryValue;
         e.setMetadata(metadata);
      } else {
View Full Code Here


      UnsignedNumeric.writeUnsignedInt(output,numArgs);
      for (int i = 0; i < numArgs; i++) {
         Object arg = args[i];
         if (arg instanceof DeltaAware) {
            // Only write deltas so that replication can be more efficient
            DeltaAware dw = (DeltaAware) arg;
            output.writeObject(dw.delta());
         } else {
            output.writeObject(arg);
         }
      }
   }
View Full Code Here

      UnsignedNumeric.writeUnsignedInt(output, numArgs);
      for (int i = 0; i < numArgs; i++) {
         Object arg = args[i];
         if (arg instanceof DeltaAware) {
            // Only write deltas so that replication can be more efficient
            DeltaAware dw = (DeltaAware) arg;
            output.writeObject(dw.delta());
         } else {
            output.writeObject(arg);
         }
      }
View Full Code Here

   public final void commit(DataContainer container, Metadata metadata) {
      //If possible, we now ensure copy-on-write semantics. This way, it can ensure the correct transaction isolation.
      //note: this method is invoked under the ClusteringDependentLogic.lock(key)
      //note2: we want to merge/copy to/from the data container value.
      CacheEntry entry = container.get(key);
      DeltaAware containerValue = entry == null ? null : (DeltaAware) entry.getValue();
      if (containerValue != null && containerValue != value) {
         value = containerValue;
      }
      if (value != null && !deltas.isEmpty()) {
         final boolean makeCopy = value instanceof CopyableDeltaAware;
View Full Code Here

      }

      if (value instanceof Delta) {
         // magic
         Delta dv = (Delta) value;
         DeltaAware toMergeWith = null;
         if (entryValue instanceof CopyableDeltaAware) {
            toMergeWith = ((CopyableDeltaAware) entryValue).copy();
         } else if (entryValue instanceof DeltaAware) {
            toMergeWith = (DeltaAware) entryValue;
         }
View Full Code Here

      UnsignedNumeric.writeUnsignedInt(output, numArgs);
      for (int i = 0; i < numArgs; i++) {
         Object arg = args[i];
         if (arg instanceof DeltaAware) {
            // Only write deltas so that replication can be more efficient
            DeltaAware dw = (DeltaAware) arg;
            output.writeObject(dw.delta());
         } else {
            output.writeObject(arg);
         }
      }
   }
View Full Code Here

      UnsignedNumeric.writeUnsignedInt(output,numArgs);
      for (int i = 0; i < numArgs; i++) {
         Object arg = args[i];
         if (arg instanceof DeltaAware) {
            // Only write deltas so that replication can be more efficient
            DeltaAware dw = (DeltaAware) arg;
            output.writeObject(dw.delta());
         } else {
            output.writeObject(arg);
         }
      }
   }
View Full Code Here

            key, entryValue, entryValue == null, true, ctx, this);

      if (value instanceof Delta) {
         // magic
         Delta dv = (Delta) value;
         DeltaAware toMergeWith = null;
         if (entryValue instanceof DeltaAware) toMergeWith = (DeltaAware) entryValue;
         e.setValue(dv.merge(toMergeWith));
         o = entryValue;
         e.setMetadata(metadata);
      } else {
View Full Code Here

            key, entryValue, entryValue == null, true, ctx, this);

      if (value instanceof Delta) {
         // magic
         Delta dv = (Delta) value;
         DeltaAware toMergeWith = null;
         if (entryValue instanceof DeltaAware) toMergeWith = (DeltaAware) entryValue;
         e.setValue(dv.merge(toMergeWith));
         o = entryValue;
         e.setMetadata(metadata);
      } else {
View Full Code Here

      UnsignedNumeric.writeUnsignedInt(output, numArgs);
      for (int i = 0; i < numArgs; i++) {
         Object arg = args[i];
         if (arg instanceof DeltaAware) {
            // Only write deltas so that replication can be more efficient
            DeltaAware dw = (DeltaAware) arg;
            output.writeObject(dw.delta());
         } else {
            output.writeObject(arg);
         }
      }
   }
View Full Code Here

TOP

Related Classes of org.infinispan.atomic.DeltaAware

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.