Package org.infinispan.container.versioning

Examples of org.infinispan.container.versioning.IncrementableEntryVersion


                     EntryVersion versionSeen = prepareCommand.getVersionsSeen().get(k);
                     if (versionSeen != null) entry.setVersion(versionSeen);
                  }

                  if (entry.performWriteSkewCheck(dataContainer)) {
                     IncrementableEntryVersion newVersion = entry.isCreated() ? versionGenerator.generateNew() : versionGenerator.increment((IncrementableEntryVersion) entry.getVersion());
                     uv.put(k, newVersion);
                  } else {
                     // Write skew check detected!
                     throw new CacheException("Write skew detected on key " + k + " for transaction " + context.getTransaction());
                  }
View Full Code Here


                  EntryVersion versionSeen = prepareCommand.getVersionsSeen().get(k);
                  if (versionSeen != null) entry.setVersion(versionSeen);
               }

               if (entry.performWriteSkewCheck(dataContainer)) {
                  IncrementableEntryVersion newVersion = entry.isCreated() ? versionGenerator.generateNew() : versionGenerator.increment((IncrementableEntryVersion) entry.getVersion());
                  uv.put(k, newVersion);
               } else {
                  // Write skew check detected!
                  throw new WriteSkewException("Write skew detected on key " + k + " for transaction " + context.getTransaction());
               }
View Full Code Here

                  EntryVersion versionSeen = prepareCommand.getVersionsSeen().get(k);
                  if (versionSeen != null) entry.setVersion(versionSeen);
               }

               if (entry.performWriteSkewCheck(dataContainer)) {
                  IncrementableEntryVersion newVersion = entry.isCreated() ? versionGenerator.generateNew() : versionGenerator.increment((IncrementableEntryVersion) entry.getVersion());
                  uv.put(k, newVersion);
               } else {
                  // Write skew check detected!
                  throw new CacheException("Write skew detected on key " + k + " for transaction " + context.getTransaction());
               }
View Full Code Here

         for (Object k : c.getAffectedKeys()) {
            if (ksl.performCheckOnKey(k)) {
               ClusteredRepeatableReadEntry entry = (ClusteredRepeatableReadEntry) context.lookupEntry(k);

               if (entry.performWriteSkewCheck(dataContainer, context, prepareCommand.getVersionsSeen().get(k), versionGenerator)) {
                  IncrementableEntryVersion newVersion = entry.isCreated()
                        ? versionGenerator.generateNew()
                        : versionGenerator.increment((IncrementableEntryVersion) entry.getMetadata().version());
                  uv.put(k, newVersion);
               } else {
                  // Write skew check detected!
View Full Code Here

         for (Object k : c.getAffectedKeys()) {
            if (ksl.performCheckOnKey(k)) {
               ClusteredRepeatableReadEntry entry = (ClusteredRepeatableReadEntry) context.lookupEntry(k);

               if (entry.performWriteSkewCheck(dataContainer, context, prepareCommand.getVersionsSeen().get(k), versionGenerator)) {
                  IncrementableEntryVersion newVersion = entry.isCreated()
                        ? versionGenerator.generateNew()
                        : versionGenerator.increment((IncrementableEntryVersion) entry.getMetadata().version());
                  uv.put(k, newVersion);
               } else {
                  // Write skew check detected!
View Full Code Here

            EntryVersionsMap uv = new EntryVersionsMap();
            for (WriteCommand c : prepareCommand.getModifications()) {
               for (Object k : c.getAffectedKeys()) {
                  ClusteredRepeatableReadEntry entry = (ClusteredRepeatableReadEntry) context.lookupEntry(k);
                  if (entry.performWriteSkewCheck(dataContainer)) {
                     IncrementableEntryVersion newVersion = entry.isCreated() ? versionGenerator.generateNew() : versionGenerator.increment((IncrementableEntryVersion) entry.getVersion());
                     uv.put(k, newVersion);
                  } else {
                     // Write skew check detected!
                     throw new CacheException("Write skew detected on key " + k + " for transaction " + context.getTransaction());
                  }
View Full Code Here

                     EntryVersion versionSeen = prepareCommand.getVersionsSeen().get(k);
                     if (versionSeen != null) entry.setVersion(versionSeen);
                  }

                  if (entry.performWriteSkewCheck(dataContainer)) {
                     IncrementableEntryVersion newVersion = entry.isCreated() ? versionGenerator.generateNew() : versionGenerator.increment((IncrementableEntryVersion) entry.getVersion());
                     uv.put(k, newVersion);
                  } else {
                     // Write skew check detected!
                     throw new CacheException("Write skew detected on key " + k + " for transaction " + context.getTransaction());
                  }
View Full Code Here

TOP

Related Classes of org.infinispan.container.versioning.IncrementableEntryVersion

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.