org.apache.ignite.cache.jta.reflect

## Class CacheReflectionTmLookup

- java.lang.Object
- - org.apache.ignite.cache.jta.reflect.CacheReflectionTmLookup

- All Implemented Interfaces:
    CacheTmLookup

      public class CacheReflectionTmLookup
      extends Object
      implements CacheTmLookup

  Implementation of `CacheTmLookup` interface that attempts to obtain JTA manager by calling static method on the class.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CacheReflectionTmLookup()` Creates uninitialized reflection TM lookup.
    `CacheReflectionTmLookup(String cls, String mtd)` Creates generic TM lookup with given class and method name.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getClassName()` Gets class name to use.
    `String` | `getMethodName()` Gets method name.
    `TransactionManager` | `getTm()` Gets Transaction Manager (TM).
    `void` | `setClassName(String cls)` Sets class name to use.
    `void` | `setMethodName(String mtd)` Sets method name.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CacheReflectionTmLookup

          public CacheReflectionTmLookup()

      Creates uninitialized reflection TM lookup.

    - #### CacheReflectionTmLookup

          public CacheReflectionTmLookup(String cls,
                                         String mtd)

      Creates generic TM lookup with given class and method name.
      Parameters:
        `cls` - Class name.
        `mtd` - Method name on that the class.

  - ### Method Detail

    - #### getClassName

          public String getClassName()

      Gets class name to use.
      Returns:
        Class name to use.

    - #### setClassName

          public void setClassName(String cls)

      Sets class name to use.
      Parameters:
        `cls` - Class name to use.

    - #### getMethodName

          public String getMethodName()

      Gets method name.
      Returns:
        Method name to use.

    - #### setMethodName

          public void setMethodName(String mtd)

      Sets method name.
      Parameters:
        `mtd` - Method name to use.

    - #### getTm

          public TransactionManager getTm()
                                   throws IgniteException

      Gets Transaction Manager (TM).
      Specified by:
        `getTm` in interface `CacheTmLookup`
      Returns:
        TM or `null` if TM cannot be looked up.
      Throws:
        `IgniteException` - In case of error.

${current.year} Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.16.0
Release Date | : December 15 2023