Package org.infinispan.util.concurrent

Examples of org.infinispan.util.concurrent.IsolationLevel


            String value = reader.getAttributeValue(i);
            Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
            switch (attribute) {
                case ISOLATION: {
                    try {
                        IsolationLevel level = IsolationLevel.valueOf(value);
                        locking.get(ModelKeys.ISOLATION).set(level.name());
                    } catch (IllegalArgumentException e) {
                        throw ParseUtils.invalidAttributeValue(reader, i);
                    }
                    break;
                }
View Full Code Here


            String value = reader.getAttributeValue(i);
            Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
            switch (attribute) {
                case ISOLATION: {
                    try {
                        IsolationLevel level = IsolationLevel.valueOf(value);
                        locking.get(ModelKeys.ISOLATION).set(level.name());
                    } catch (IllegalArgumentException e) {
                        throw ParseUtils.invalidAttributeValue(reader, i);
                    }
                    break;
                }
View Full Code Here

        // locking is a child resource
        if (cache.hasDefined(ModelKeys.LOCKING) && cache.get(ModelKeys.LOCKING, ModelKeys.LOCKING_NAME).isDefined()) {
            ModelNode locking = cache.get(ModelKeys.LOCKING, ModelKeys.LOCKING_NAME);
           
            final IsolationLevel isolationLevel = IsolationLevel.READ_COMMITTED;
            if (LockingResource.ISOLATION.resolveModelAttribute(context, locking).isDefined()) { 
               log.warn("Ignoring XML attribute " + ModelKeys.ISOLATION + ", please remove from configuration file");
            }
            final boolean striping = LockingResource.STRIPING.resolveModelAttribute(context, locking).asBoolean();
            final long acquireTimeout = LockingResource.ACQUIRE_TIMEOUT.resolveModelAttribute(context, locking).asLong();
View Full Code Here

      try {
         assertNull(cache.get("k1"));

         // Now simulate that someone else wrote to the store while during our tx
         store.write(new MarshalledEntryImpl("k1", "v1", null, sm));
         IsolationLevel level = cache.getCacheConfiguration().locking().isolationLevel();
         switch(level) {
            case READ_COMMITTED:
               assertEquals("v1", cache.get("k1"));
               break;
            case REPEATABLE_READ:
View Full Code Here

            String value = reader.getAttributeValue(i);
            Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
            switch (attribute) {
                case ISOLATION: {
                    try {
                        IsolationLevel level = IsolationLevel.valueOf(value);
                        locking.get(ModelKeys.ISOLATION).set(level.name());
                    } catch (IllegalArgumentException e) {
                        throw ParseUtils.invalidAttributeValue(reader, i);
                    }
                    break;
                }
View Full Code Here

                  configuration.clustering().async().useReplQueue());
   }

   public final void configurationOverridesShouldOverrideIsolationLevelPropIfExplicitlySet()
         throws Exception {
      final IsolationLevel expectedIsolationLevel = IsolationLevel.SERIALIZABLE;

      final ConfigurationOverrides objectUnderTest = new ConfigurationOverrides();
      objectUnderTest.setIsolationLevel(expectedIsolationLevel);
      final ConfigurationBuilder defaultConfiguration = new ConfigurationBuilder();
      objectUnderTest.applyOverridesTo(defaultConfiguration);
View Full Code Here

            String value = reader.getAttributeValue(i);
            Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
            switch (attribute) {
                case ISOLATION: {
                    try {
                        IsolationLevel level = IsolationLevel.valueOf(value);
                        locking.get(ModelKeys.ISOLATION).set(level.name());
                    } catch (IllegalArgumentException e) {
                        throw ParseUtils.invalidAttributeValue(reader, i);
                    }
                    break;
                }
View Full Code Here

            String value = reader.getAttributeValue(i);
            Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
            switch (attribute) {
                case ISOLATION: {
                    try {
                        IsolationLevel level = IsolationLevel.valueOf(value);
                        locking.get(ModelKeys.ISOLATION).set(level.name());
                    } catch (IllegalArgumentException e) {
                        throw ParseUtils.invalidAttributeValue(reader, i);
                    }
                    break;
                }
View Full Code Here

        // locking is a child resource
        if (cache.hasDefined(ModelKeys.LOCKING) && cache.get(ModelKeys.LOCKING, ModelKeys.LOCKING_NAME).isDefined()) {
            ModelNode locking = cache.get(ModelKeys.LOCKING, ModelKeys.LOCKING_NAME);

            final IsolationLevel isolationLevel = IsolationLevel.valueOf(CommonAttributes.ISOLATION.resolveModelAttribute(context, locking).asString());
            final boolean striping = CommonAttributes.STRIPING.resolveModelAttribute(context, locking).asBoolean();
            final long acquireTimeout = CommonAttributes.ACQUIRE_TIMEOUT.resolveModelAttribute(context, locking).asLong();
            final int concurrencyLevel = CommonAttributes.CONCURRENCY_LEVEL.resolveModelAttribute(context, locking).asInt();

            builder.locking()
View Full Code Here

TOP

Related Classes of org.infinispan.util.concurrent.IsolationLevel

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.