Class InlineObjectBytesDetector

  • All Implemented Interfaces:
    BPlusTree.TreeRowClosure<IndexRow,​IndexRow>

    public class InlineObjectBytesDetector
    extends Object
    implements BPlusTree.TreeRowClosure<IndexRow,​IndexRow>
    This class helps to detect whether tree contains inlined JO type. When starting on old Ignite versions it's impossible to discover whether JO type was inlined or not. Then try to find that with 2 steps: 1. analyze of inline size; 2. traverse tree and check stored values.
    • Constructor Detail

      • InlineObjectBytesDetector

        public InlineObjectBytesDetector​(int inlineSize,
                                         Collection<IndexKeyDefinition> keyDefs,
                                         IndexName idxName,
                                         IgniteLogger log)
        Parameters:
        inlineSize - Inline size.
        keyDefs - Index key definitions.
        idxName - Index name.
        log - Ignite logger.
    • Method Detail

      • inlineObjectSupported

        public boolean inlineObjectSupported()
        Returns:
        true if inline object is supported on current tree.
      • objectMayBeInlined

        public static boolean objectMayBeInlined​(int inlineSize,
                                                 Collection<IndexKeyDefinition> keyDefs)
        Static analyze inline_size and inline columns set. e.g.: indexed: (long, obj) and inline_size < 12. In this case there is no space for inline object.
        Parameters:
        keyDefs - Index key definition.
        inlineSize - Inline size.
        Returns:
        true If the object may be inlined.