/** * Creates a WriteBatchWithIndex where no bytes * are reserved up-front, bytewise comparison is * used for fallback key comparisons, * and duplicate keys operations are retained */ public WriteBatchWithIndex() { super(newWriteBatchWithIndex()); }
/** * Creates a WriteBatchWithIndex where no bytes * are reserved up-front, bytewise comparison is * used for fallback key comparisons, and duplicate key * assignment is determined by the constructor argument * * @param overwriteKey if true, overwrite the key in the index when * inserting a duplicate key, in this way an iterator will never * show two entries with the same key. */ public WriteBatchWithIndex(final boolean overwriteKey) { super(newWriteBatchWithIndex(overwriteKey)); }
/** * Creates a WriteBatchWithIndex * * @param fallbackIndexComparator We fallback to this comparator * to compare keys within a column family if we cannot determine * the column family and so look up it's comparator. * * @param reservedBytes reserved bytes in underlying WriteBatch * * @param overwriteKey if true, overwrite the key in the index when * inserting a duplicate key, in this way an iterator will never * show two entries with the same key. */ public WriteBatchWithIndex( final AbstractComparator<? extends AbstractSlice<?>> fallbackIndexComparator, final int reservedBytes, final boolean overwriteKey) { super(newWriteBatchWithIndex(fallbackIndexComparator.nativeHandle_, fallbackIndexComparator.getComparatorType().getValue(), reservedBytes, overwriteKey)); }