Class IgniteAdapter.Builder
- Enclosing interface:
- IgniteAdapter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowExtraFields(boolean allowExtraFields) The adaptedIgniteinstances support two distinct strategies for mapping Java Objects to Ignite 3 Tables.allowNonDefaultConstructors(boolean allowNonDefaultConstructors) This enables mapping Java classes which do not define a default constructor.org.apache.ignite.Ignitebuild()Creates a new adaptedIgniteinstance.
-
Constructor Details
-
Builder
Creates a new instance of this builder.
-
-
Method Details
-
allowExtraFields
The adaptedIgniteinstances 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
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 adaptedIgniteinstance.- Returns:
- The new instance.
-