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
  • Constructor Details

    • IsolationLevelHelpers

      public IsolationLevelHelpers()
  • Method Details

    • toSpringIsolationLevel

      public static int toSpringIsolationLevel(IsolationLevelModifiers modifiers)
      Converts a GigaSpaces XAP IsolationLevelModifiers to a Spring Isolation Level
      Parameters:
      modifiers - GigaSpaces XAP IsolationLevelModifiers
      Returns:
      Spring Isolation Level
    • fromSpringIsolationLevel

      public static IsolationLevelModifiers fromSpringIsolationLevel(Integer springIsolationLevel)
      Converts a Spring Isolation Level to a GigaSpaces XAP IsolationLevelModifiers.
      Parameters:
      springIsolationLevel - Spring Isolation Level
      Returns:
      GigaSpaces XAP IsolationLevelModifiers
    • 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:
    • 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