Examples of Delta


Examples of org.exoplatform.services.document.diff.Delta

   public synchronized void applyTo(List target) throws Exception
   {
      ListIterator i = deltas_.listIterator(deltas_.size());
      while (i.hasPrevious())
      {
         Delta delta = (Delta)i.previous();
         delta.patch(target);
      }
   }
View Full Code Here

Examples of org.fest.assertions.Delta

    public DoubleMatrix1DAssertion isEquivalentTo(double [] values, double delta)
    {
        assertThat(actualMatrix).isNotNull();
        assertThat(actualMatrix.size()).as("size").isEqualTo(values.length);

        final Delta deltaObject = Delta.delta(delta);
        for (int column = 0; column < values.length; column++)
        {
            assertThat(actualMatrix.get(column)).as(description + "[" + column + "]")
                .isEqualTo(values[column], deltaObject);
        }
View Full Code Here

Examples of org.infinispan.atomic.Delta

      } else {
         notifier.notifyCacheEntryModified(key, entryValue, true, ctx);

         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.setLifespan(lifespanMillis);
            e.setMaxIdle(maxIdleTimeMillis);
         } else {
            o = e.setValue(value);
View Full Code Here

Examples of org.infinispan.atomic.Delta

      } else {
         notifier.notifyCacheEntryModified(key, entryValue, true, ctx);

         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.setLifespan(lifespanMillis);
            e.setMaxIdle(maxIdleTimeMillis);
         } else {
            o = e.setValue(value);
View Full Code Here

Examples of org.infinispan.atomic.Delta

      } else {
         notifier.notifyCacheEntryModified(key, e.getValue(), true, ctx);

         if (value instanceof Delta) {
            // magic
            Delta dv = (Delta) value;
            Object existing = e.getValue();
            DeltaAware toMergeWith = null;
            if (existing instanceof DeltaAware) toMergeWith = (DeltaAware) existing;
            e.setValue(dv.merge(toMergeWith));
            o = existing;
            e.setLifespan(lifespanMillis);
            e.setMaxIdle(maxIdleTimeMillis);
         } else {
            o = e.setValue(value);
View Full Code Here

Examples of org.infinispan.atomic.Delta

      } else {
         notifier.notifyCacheEntryModified(key, entryValue, true, ctx);

         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.setLifespan(lifespanMillis);
            e.setMaxIdle(maxIdleTimeMillis);
         } else {
            o = e.setValue(value);
View Full Code Here

Examples of org.infinispan.atomic.Delta

   }                                                                       

   public void testPutThrowsLocalException() throws Exception {
      tm(0).begin();

      Delta d = new Delta() {
         public DeltaAware merge(DeltaAware d) {
            throw new RuntimeException("Induced!");
         }
      };
View Full Code Here

Examples of org.infinispan.atomic.Delta

      removed = b;
   }

   @Override
   public Delta delta() {
      Delta toReturn = delta == null ? NullDelta.INSTANCE : delta;
      delta = null; // reset
      return toReturn;
   }
View Full Code Here

Examples of org.infinispan.atomic.Delta

         notifier.notifyCacheEntryModified(key, value, entryValue, e.getMetadata(), true, ctx, this);
      }

      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;
         }
         e.setValue(dv.merge(toMergeWith));
         o = entryValue;
      } else {
         o = e.setValue(value);
         if (e.isRemoved()) {
            e.setRemoved(false);
View Full Code Here

Examples of org.infinispan.atomic.Delta

      } else {
         notifier.notifyCacheEntryModified(key, entryValue, true, ctx);

         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.setLifespan(lifespanMillis);
            e.setMaxIdle(maxIdleTimeMillis);
         } else {
            o = e.setValue(value);
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.