org.openspaces.core
Class IsolationLevelHelpers
java.lang.Object
org.openspaces.core.IsolationLevelHelpers
public class IsolationLevelHelpers
- extends Object
Utility methods to handle conversions between different isolation level representations.
- Since:
- 9.5
- Author:
- Dan Kilman
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IsolationLevelHelpers
public IsolationLevelHelpers()
convertSpringToSpaceIsolationLevel
public static int convertSpringToSpaceIsolationLevel(int springIsolationLevel,
int defaultValue)
- Parameters:
springIsolationLevel
- the spring isolation level as defined in TransactionDefinition
.defaultValue
- The modifiers to use in case springIsolationLevel equals
TransactionDefinition.ISOLATION_DEFAULT
- Returns:
- A matcing GigaSpaces isolation level modifier.
- See Also:
TransactionDefinition}, {@link ReadModifiers}, {@link CountModifiers}
toReadModifiers
public static ReadModifiers toReadModifiers(int isolationLevel)
- Parameters:
isolationLevel
- The isolation level code number.
- Returns:
- a
ReadModifiers
instance representing the isolationLevel parameter
toCountModifiers
public static CountModifiers toCountModifiers(int isolationLevel)
- Parameters:
isolationLevel
- The isolation level code number.
- Returns:
- a
CountModifiers
instance representing the isolationLevel parameter
mergeWithIsolationLevelModifiersIfNeeded
public static ReadModifiers mergeWithIsolationLevelModifiersIfNeeded(ReadModifiers modifiers,
GigaSpace gigaSpace)
- Parameters:
modifiers
- The modifiers to merge the isolation level with.gigaSpace
- The GigaSpace
instance to test the current isolation level with.
- Returns:
- The merged modifiers (i.e, if there is a current transaction defined and it has a non default
isolation level set, it will replace any currently set isolation level on the modifiers argument.
mergeWithIsolationLevelModifiersIfNeeded
public static CountModifiers mergeWithIsolationLevelModifiersIfNeeded(CountModifiers modifiers,
GigaSpace gigaSpace)
- Parameters:
modifiers
- The modifiers to merge the isolation level with.gigaSpace
- The GigaSpace
instance to test the current isolation level with.
- Returns:
- The merged modifiers (i.e, if there is a current transaction defined and it has a non default
isolation level set, it will replace any currently set isolation level on the modifiers argument.
Copyright © GigaSpaces.