Package org.apache.ignite.table
Interface RecordView<R>
- Type Parameters:
R- Mapped record type.
- All Superinterfaces:
AutoCloseable,ContinuousQuerySource<R>,CriteriaQuerySource<R>,DataStreamerTarget<R>
public interface RecordView<R>
extends DataStreamerTarget<R>, CriteriaQuerySource<R>, ContinuousQuerySource<R>, AutoCloseable
Table view interface provides methods to access table records.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(@Nullable Transaction tx, R keyRec) Determines whether a table contains an entry for the specified key.booleancontainsAll(@Nullable Transaction tx, Collection<R> keys) Determines whether a table contains entries for all given keys.containsAllAsync(@Nullable Transaction tx, Collection<R> keys) Determines whether a table contains entries for all given keys.containsAsync(@Nullable Transaction tx, R keyRec) Determines whether a table contains an entry for the specified key.booleandelete(@Nullable Transaction tx, R keyRec) Deletes a record with the same key column values as the given one from a table.voiddeleteAll(@Nullable Transaction tx) Removes all entries from a table records.deleteAll(@Nullable Transaction tx, Collection<R> keyRecs) Removes from a table records with the same key column values as the given one.deleteAllAsync(@Nullable Transaction tx) Asynchronously removes all entries from a table records.deleteAllAsync(@Nullable Transaction tx, Collection<R> keyRecs) Asynchronously removes from a table records with the same key column values as the given one.deleteAllExact(@Nullable Transaction tx, Collection<R> recs) Remove the given records from a table.deleteAllExactAsync(@Nullable Transaction tx, Collection<R> recs) Asynchronously removes the given records from a table.deleteAsync(@Nullable Transaction tx, R keyRec) Asynchronously deletes a record with the same key column values as the given one from a table.booleandeleteExact(@Nullable Transaction tx, R rec) Deletes the given record from a table.deleteExactAsync(@Nullable Transaction tx, R rec) Asynchronously deletes the given record from a table.get(@Nullable Transaction tx, R keyRec) Gets a record with the same key column values as the given one from a table.getAll(@Nullable Transaction tx, Collection<R> keyRecs) Gets records from a table.getAllAsync(@Nullable Transaction tx, Collection<R> keyRecs) Asynchronously gets records from a table.getAndDelete(@Nullable Transaction tx, R keyRec) Gets and deletes from a table a record with the same key column values as the given one.getAndDeleteAsync(@Nullable Transaction tx, R keyRec) Asynchronously gets and deletes from a table a record with the same key columns values as the given one.getAndReplace(@Nullable Transaction tx, R rec) Gets an existing record associated with the same key columns values as the given one, then replaces it with the given one.getAndReplaceAsync(@Nullable Transaction tx, R rec) Asynchronously gets an existing record associated with the same key column values as the given one, then replaces it with the given one.getAndUpsert(@Nullable Transaction tx, R rec) Inserts a record into a table, or replaces an existing record and returns the replaced record.getAndUpsertAsync(@Nullable Transaction tx, R rec) Asynchronously inserts a record into a table, or replaces an existing record and returns the replaced record.getAsync(@Nullable Transaction tx, R keyRec) Asynchronously gets a record with the same key column values as the given one from a table.booleaninsert(@Nullable Transaction tx, R rec) Inserts a record into a table if it does not exists.insertAll(@Nullable Transaction tx, Collection<R> recs) Inserts into a table records that do not exist, skips those that exist.insertAllAsync(@Nullable Transaction tx, Collection<R> recs) Asynchronously inserts into a table records that do not exist, skips those that exist.insertAsync(@Nullable Transaction tx, R rec) Asynchronously inserts a record into a table if it does not exists.booleanreplace(@Nullable Transaction tx, R rec) Replaces an existing record associated with the same key column values as the given record.booleanreplace(@Nullable Transaction tx, R oldRec, R newRec) Replaces an expected record in the table with the given new one.replaceAsync(@Nullable Transaction tx, R rec) Asynchronously replaces an existing record associated with the same key columns values as the given record.replaceAsync(@Nullable Transaction tx, R oldRec, R newRec) Asynchronously replaces an existing record in the table with the given new one.voidupsert(@Nullable Transaction tx, R rec) Inserts a record into a table, if it does not exist, or replaces an existing one.voidupsertAll(@Nullable Transaction tx, Collection<R> recs) Inserts records into a table, if they do not exist, or replaces the existing ones.upsertAllAsync(@Nullable Transaction tx, Collection<R> recs) Asynchronously inserts a record into a table, if it does not exist, or replaces the existing one.upsertAsync(@Nullable Transaction tx, R rec) Asynchronously inserts a record into a table, if it does not exist, or replaces the existing one.Methods inherited from interface java.lang.AutoCloseable
closeMethods inherited from interface org.apache.ignite.table.ContinuousQuerySource
queryContinuously, queryContinuouslyMethods inherited from interface org.apache.ignite.table.criteria.CriteriaQuerySource
query, query, query, queryAsync, queryAsync, queryAsyncMethods inherited from interface org.apache.ignite.table.DataStreamerTarget
streamData, streamData, streamData
-
Method Details
-
get
Gets a record with the same key column values as the given one from a table.- Parameters:
tx- Transaction ornullfor implicit transaction.keyRec- Record with the key columns set. The record cannot benull.- Returns:
- Record with all columns filled from the table.
-
getAsync
Asynchronously gets a record with the same key column values as the given one from a table.- Parameters:
tx- Transaction ornullfor implicit transaction.keyRec- Record with the key columns set. The record cannot benull.- Returns:
- Future that represents the pending completion of the operation.
-
getAll
Gets records from a table.- Parameters:
tx- Transaction ornullfor implicit transaction.keyRecs- Records with key columns set. The records cannot benull.- Returns:
- Records with all columns filled from the table. The order of collection elements is
guaranteed to be the same as the order of
keyRecs. If a record does not exist, the element at the corresponding index of the resulting collection isnull.
-
getAllAsync
Asynchronously gets records from a table.- Parameters:
tx- Transaction ornullfor implicit transaction.keyRecs- Records with the key columns set. The records cannot benull.- Returns:
- Future that will return records with all columns filled from the table. The order of collection elements is
guaranteed to be the same as the order of
keyRecs. If a record does not exist, the element at the corresponding index of the resulting collection isnull.
-
contains
Determines whether a table contains an entry for the specified key.- Parameters:
tx- Transaction ornullfor implicit transaction.keyRec- A record with key columns set. The key cannot benull.- Returns:
Trueif a value exists for every specified key,falseotherwise.- Throws:
MarshallerException- if the key doesn't match the schema.
-
containsAsync
Determines whether a table contains an entry for the specified key.- Parameters:
tx- Transaction ornullfor implicit transaction.keyRec- A record with key columns set. The key cannot benull.- Returns:
- Future that represents the pending completion of the operation.
- Throws:
MarshallerException- if the key doesn't match the schema.
-
containsAll
Determines whether a table contains entries for all given keys.- Parameters:
tx- Transaction ornullfor implicit transaction.keys- Keys whose presence is to be verified. The collection and it's values cannot benull.- Returns:
Trueif a value exists for every specified key,falseotherwise.- Throws:
MarshallerException- if the key doesn't match the schema.
-
containsAllAsync
Determines whether a table contains entries for all given keys.- Parameters:
tx- Transaction ornullfor implicit transaction.keys- Keys whose presence is to be verified. The collection and it's values cannot benull.- Returns:
- Future that represents the pending completion of the operation. The result of the future will be
trueif a value exists for every specified key,falseotherwise. - Throws:
MarshallerException- if the key doesn't match the schema.
-
upsert
Inserts a record into a table, if it does not exist, or replaces an existing one.- Parameters:
tx- Transaction ornullfor implicit transaction.rec- Record to insert into the table. The record cannot benull.
-
upsertAsync
Asynchronously inserts a record into a table, if it does not exist, or replaces the existing one.- Parameters:
tx- Transaction ornullfor implicit transaction.rec- Record to insert into the table. The record cannot benull.- Returns:
- Future that represents the pending completion of the operation.
-
upsertAll
Inserts records into a table, if they do not exist, or replaces the existing ones.- Parameters:
tx- Transaction ornullfor implicit transaction.recs- Records to insert into the table. The records cannot benull.
-
upsertAllAsync
Asynchronously inserts a record into a table, if it does not exist, or replaces the existing one.- Parameters:
tx- Transaction ornullfor implicit transaction.recs- Records to insert into the table. The records cannot benull.- Returns:
- Future that represents the pending completion of the operation.
-
getAndUpsert
Inserts a record into a table, or replaces an existing record and returns the replaced record.- Parameters:
tx- Transaction ornullfor implicit transaction.rec- A record to insert into the table. The record cannot benull.- Returns:
- Replaced record or
nullif it did not exist.
-
getAndUpsertAsync
Asynchronously inserts a record into a table, or replaces an existing record and returns the replaced record.- Parameters:
tx- Transaction ornullfor implicit transaction.rec- Record to insert into the table. The record cannot benull.- Returns:
- Future that represents the pending completion of the operation.
-
insert
Inserts a record into a table if it does not exists.- Parameters:
tx- Transaction ornullfor implicit transaction.rec- Record to insert into the table. The record cannot benull.- Returns:
Trueif successful,falseotherwise.
-
insertAsync
Asynchronously inserts a record into a table if it does not exists.- Parameters:
tx- Transaction ornullfor implicit transaction.rec- Record to insert into the table. The record cannot benull.- Returns:
- Future that represents the pending completion of the operation.
-
insertAll
Inserts into a table records that do not exist, skips those that exist.- Parameters:
tx- Transaction ornullfor implicit transaction.recs- Records to insert into the table. The records cannot benull.- Returns:
- Skipped records. If a record is inserted, the element will be excluded from the collection result.
-
insertAllAsync
Asynchronously inserts into a table records that do not exist, skips those that exist.- Parameters:
tx- Transaction ornullfor implicit transaction.recs- Records to insert into the table. The records cannot benull.- Returns:
- Future representing pending completion of the operation, with rejected rows for insertion in the result. If a record is inserted, the element will be excluded from the collection result.
-
replace
Replaces an existing record associated with the same key column values as the given record.- Parameters:
tx- Transaction ornullfor implicit transaction.rec- Record to replace with. The record cannot benull.- Returns:
Trueif a record was found and replaced successfully,falseotherwise.
-
replace
Replaces an expected record in the table with the given new one.- Parameters:
tx- Transaction ornullfor implicit transaction.oldRec- Record to replace. The record cannot benull.newRec- Record to replace with. The record cannot benull.- Returns:
Trueif a record was replaced successfully,falseotherwise.
-
replaceAsync
Asynchronously replaces an existing record associated with the same key columns values as the given record.- Parameters:
tx- Transaction ornullfor implicit transaction.rec- Record to replace with. The record cannot benull.- Returns:
- Future that represents the pending completion of the operation.
-
replaceAsync
Asynchronously replaces an existing record in the table with the given new one.- Parameters:
tx- Transaction ornullfor implicit transaction.oldRec- Record to replace. The record cannot benull.newRec- Record to replace with. The record cannot benull.- Returns:
- Future that represents the pending completion of the operation.
-
getAndReplace
Gets an existing record associated with the same key columns values as the given one, then replaces it with the given one.- Parameters:
tx- Transaction ornullfor implicit transaction.rec- Record to replace with. The record cannot benull.- Returns:
- Replaced record or
nullif it did not exist.
-
getAndReplaceAsync
Asynchronously gets an existing record associated with the same key column values as the given one, then replaces it with the given one.- Parameters:
tx- Transaction ornullfor implicit transaction.rec- Record to replace with. The record cannot benull.- Returns:
- Future that represents the pending completion of the operation.
-
delete
Deletes a record with the same key column values as the given one from a table.- Parameters:
tx- Transaction ornullfor implicit transaction.keyRec- Record with the key columns set. The record cannot benull.- Returns:
Trueif removed successfully,falseotherwise.
-
deleteAsync
Asynchronously deletes a record with the same key column values as the given one from a table.- Parameters:
tx- Transaction ornullfor implicit transaction.keyRec- Record with the key columns set. The record cannot benull.- Returns:
- Future that represents the pending completion of the operation.
-
deleteExact
Deletes the given record from a table.- Parameters:
tx- Transaction ornullfor implicit transaction.rec- Record to delete. The record cannot benull.- Returns:
Trueif removed successfully,falseotherwise.
-
deleteExactAsync
Asynchronously deletes the given record from a table.- Parameters:
tx- Transaction ornullfor implicit transaction.rec- Record to delete. The record cannot benull.- Returns:
- Future tha represents the pending completion of the operation.
-
getAndDelete
Gets and deletes from a table a record with the same key column values as the given one.- Parameters:
tx- Transaction ornullfor implicit transaction.keyRec- Record with the key columns set. The record cannot benull.- Returns:
- Removed record or
nullif it did not exist.
-
getAndDeleteAsync
Asynchronously gets and deletes from a table a record with the same key columns values as the given one.- Parameters:
tx- Transaction ornullfor implicit transaction.keyRec- Record with the key columns set. The record cannot benull.- Returns:
- Future that represents the pending completion of the operation.
-
deleteAll
Removes from a table records with the same key column values as the given one.- Parameters:
tx- Transaction ornullfor implicit transaction.keyRecs- Records with the key columns set. The records cannot benull.- Returns:
- Records with the key columns set that did not exist. If a record is removed, the element will be excluded from the collection result.
-
deleteAll
Removes all entries from a table records.- Parameters:
tx- Transaction ornullfor implicit transaction.
-
deleteAllAsync
CompletableFuture<List<R>> deleteAllAsync(@Nullable @Nullable Transaction tx, Collection<R> keyRecs) Asynchronously removes from a table records with the same key column values as the given one.- Parameters:
tx- Transaction ornullfor implicit transaction.keyRecs- Records with the key columns set. The records cannot benull.- Returns:
- Future represents the pending completion of the operation, with rejected rows for deletion in the result. If a record is removed, the element will be excluded from the collection result.
-
deleteAllAsync
Asynchronously removes all entries from a table records.- Parameters:
tx- Transaction ornullfor implicit transaction.- Returns:
- Future represents the pending completion of the operation.
-
deleteAllExact
Remove the given records from a table.- Parameters:
tx- Transaction ornullfor implicit transaction.recs- Records to delete. The records cannot benull.- Returns:
- Records that were not deleted. If a record is removed, the element will be excluded from the collection result.
-
deleteAllExactAsync
CompletableFuture<List<R>> deleteAllExactAsync(@Nullable @Nullable Transaction tx, Collection<R> recs) Asynchronously removes the given records from a table.- Parameters:
tx- Transaction ornullfor implicit transaction.recs- Records to delete. The records cannot benull.- Returns:
- Future represents the pending completion of the operation, with rejected rows for deletion in the result. If a record is removed, the element will be excluded from the collection result.
-