Class ClientTableCommon
java.lang.Object
org.apache.ignite.client.handler.requests.table.ClientTableCommon
Common table functionality.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intgetDecimalScale(org.apache.ignite.internal.type.NativeType type) Gets type scale.static intgetPrecision(org.apache.ignite.internal.type.NativeType type) Gets type precision.static CompletableFuture<org.apache.ignite.internal.table.TableViewInternal>readTableAsync(int tableId, IgniteTables tables) Reads a table.static CompletableFuture<Tuple>readTuple(int schemaId, BitSet noValueSet, byte[] tupleBytes, org.apache.ignite.internal.table.TableViewInternal table, boolean keyOnly) static TuplereadTuple(BitSet noValueSet, byte[] tupleBytes, boolean keyOnly, org.apache.ignite.internal.schema.SchemaDescriptor schema) Reads a tuple.static @Nullable org.apache.ignite.internal.tx.InternalTransactionreadTx(org.apache.ignite.internal.client.proto.ClientMessageUnpacker in, org.apache.ignite.internal.hlc.HybridTimestampTracker tsUpdater, ClientResourceRegistry resources, @Nullable org.apache.ignite.internal.tx.TxManager txManager, @Nullable NotificationSender notificationSender, long[] resourceIdHolder) Reads transaction.static org.apache.ignite.internal.tx.InternalTransactionstartExplicitTx(org.apache.ignite.internal.hlc.HybridTimestampTracker tsTracker, org.apache.ignite.internal.tx.TxManager txManager, @Nullable org.apache.ignite.internal.hlc.HybridTimestamp currentTs, boolean readOnly, org.apache.ignite.internal.tx.InternalTxOptions options) Starts an explicit transaction.static TableNotFoundExceptiontableIdNotFoundException(Integer tableId) Returns a new table id not found exception.static voidwriteTxMeta(org.apache.ignite.internal.client.proto.ClientMessagePacker out, org.apache.ignite.internal.hlc.HybridTimestampTracker tsTracker, @Nullable org.apache.ignite.internal.hlc.ClockService clockService, org.apache.ignite.internal.tx.InternalTransaction tx, long resourceId) Write tx metadata.
-
Constructor Details
-
ClientTableCommon
public ClientTableCommon()
-
-
Method Details
-
readTuple
public static CompletableFuture<Tuple> readTuple(int schemaId, BitSet noValueSet, byte[] tupleBytes, org.apache.ignite.internal.table.TableViewInternal table, boolean keyOnly) -
readTuple
public static Tuple readTuple(BitSet noValueSet, byte[] tupleBytes, boolean keyOnly, org.apache.ignite.internal.schema.SchemaDescriptor schema) Reads a tuple.- Parameters:
noValueSet- No value set.tupleBytes- Tuple bytes.keyOnly- Key only flag.schema- Schema.- Returns:
- Tuple.
-
readTableAsync
public static CompletableFuture<org.apache.ignite.internal.table.TableViewInternal> readTableAsync(int tableId, IgniteTables tables) Reads a table.- Parameters:
tableId- Table id.tables- Ignite tables.- Returns:
- Table.
- Throws:
IgniteException- If an unspecified platform exception has happened internally. Is thrown when:- the node is stopping.
-
writeTxMeta
public static void writeTxMeta(org.apache.ignite.internal.client.proto.ClientMessagePacker out, org.apache.ignite.internal.hlc.HybridTimestampTracker tsTracker, @Nullable @Nullable org.apache.ignite.internal.hlc.ClockService clockService, org.apache.ignite.internal.tx.InternalTransaction tx, long resourceId) Write tx metadata.- Parameters:
out- Packer.tsTracker- Timestamp tracker.clockService- Clock service.tx- Transaction.resourceId- Resource id.
-
tableIdNotFoundException
Returns a new table id not found exception.- Parameters:
tableId- Table id.- Returns:
- Exception.
-
readTx
@Nullable public static @Nullable org.apache.ignite.internal.tx.InternalTransaction readTx(org.apache.ignite.internal.client.proto.ClientMessageUnpacker in, org.apache.ignite.internal.hlc.HybridTimestampTracker tsUpdater, ClientResourceRegistry resources, @Nullable @Nullable org.apache.ignite.internal.tx.TxManager txManager, @Nullable @Nullable NotificationSender notificationSender, long[] resourceIdHolder) Reads transaction.- Parameters:
in- Unpacker.tsUpdater- Packer.resources- Resource registry.txManager- Tx manager.notificationSender- Notification sender.resourceIdHolder- Resource id holder.- Returns:
- Transaction, if present, or null.
-
startExplicitTx
public static org.apache.ignite.internal.tx.InternalTransaction startExplicitTx(org.apache.ignite.internal.hlc.HybridTimestampTracker tsTracker, org.apache.ignite.internal.tx.TxManager txManager, @Nullable @Nullable org.apache.ignite.internal.hlc.HybridTimestamp currentTs, boolean readOnly, org.apache.ignite.internal.tx.InternalTxOptions options) Starts an explicit transaction.- Parameters:
tsTracker- Tracker.txManager- Ignite transactions.currentTs- Current observation timestamp ornullif it is not defined.readOnly- Read only flag.options- Transaction options.- Returns:
- Transaction.
-
getDecimalScale
public static int getDecimalScale(org.apache.ignite.internal.type.NativeType type) Gets type scale.- Parameters:
type- Type.- Returns:
- Scale.
-
getPrecision
public static int getPrecision(org.apache.ignite.internal.type.NativeType type) Gets type precision.- Parameters:
type- Type.- Returns:
- Precision.
-