Class IgniteAdapter.Builder

java.lang.Object
org.gridgain.ignite.migrationtools.adapter.IgniteAdapter.Builder
Enclosing interface:
IgniteAdapter

public static class IgniteAdapter.Builder extends Object
Builder for IgniteAdapter.
  • Constructor Details

    • Builder

      public Builder(String address)
      Creates a new instance of this builder.
  • Method Details

    • allowExtraFields

      public IgniteAdapter.Builder allowExtraFields(boolean allowExtraFields)
      The adapted Ignite instances support two distinct strategies for mapping Java Objects to Ignite 3 Tables.

      With allowExtraField enabled, unsupported attributes in the mapped type, for instance, other nested Java Objects will be mapped to an additional column allowing them to be persisted and retrieved alongside the data. This mimics the default behaviour in Ignite 2 since Java Objects are fully serialized into cache rows irrespectively of the cache's indexed types and query entities.

      When this feature is disabled, the mapped classes must completely match the Ignite 3 table schema.

      Unfortunately, this feature may introduce a significant performance penalty for large objects. Therefore, it is disabled by default.

      This feature is closely related to the PACK_EXTRA mode in the migrate cache cli. If, by any chance, you are working with caches migrated using this mode, you should enable this feature to have access to all the migrated data out-of-the-box.

      Parameters:
      allowExtraFields - Enables or Disables this feature.
      Returns:
      The same instance of the builder.
    • allowNonDefaultConstructors

      public IgniteAdapter.Builder allowNonDefaultConstructors(boolean allowNonDefaultConstructors)
      This enables mapping Java classes which do not define a default constructor.

      This feature is not supported natively in Ignite 3 / Gridgain 9. As a result, we encourage you to implement default constructors in your data classes instead of relying on this feature since it relies on unsafe mechanisms and introduces a small performance penalty.

      This feature is disabled by default.
      Parameters:
      allowNonDefaultConstructors - Enables or Disables this feature.
      Returns:
      The same instance of the builder.
    • build

      public org.apache.ignite.Ignite build()
      Creates a new adapted Ignite instance.
      Returns:
      The new instance.