public abstract class ProxyTarantoolSpace<T extends Packable,R extends Collection<T>> extends Object implements TarantoolSpaceOperations<T,R>
TarantoolSpaceOperations implementation, which uses calls to API functions defined in
Tarantool instance for performing CRUD operations on a space| Constructor and Description |
|---|
ProxyTarantoolSpace(TarantoolClientConfig config,
TarantoolCallOperations client,
ProxyOperationsMappingConfig operationsMapping,
TarantoolMetadataOperations metadata,
TarantoolSpaceMetadata spaceMetadata) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<R> |
delete(Conditions conditions)
Delete a tuple.
|
CompletableFuture<R> |
delete(Conditions conditions,
DeleteOptions options)
Delete a tuple.
|
TarantoolSpaceMetadata |
getMetadata()
Get metadata associated with this space
|
CompletableFuture<R> |
insert(T tuple)
Inserts tuple into the space, if no tuple with same unique keys exists.
|
CompletableFuture<R> |
insert(T tuple,
InsertOptions options)
Inserts tuple into the space, if no tuple with same unique keys exists.
|
CompletableFuture<R> |
insertMany(Collection<T> tuples)
Inserts several tuples into the space at once.
|
CompletableFuture<R> |
insertMany(Collection<T> tuples,
InsertManyOptions options)
Inserts several tuples into the space at once.
|
protected abstract TupleOperations |
makeOperationsFromTuple(T tuple)
Create a
TupleOperations instance from the given tuple of type T |
CompletableFuture<R> |
replace(T tuple)
Insert a tuple into the space or replace an existing one.
|
CompletableFuture<R> |
replace(T tuple,
ReplaceOptions options)
Insert a tuple into the space or replace an existing one.
|
CompletableFuture<R> |
replaceMany(Collection<T> tuples)
Insert or replace several tuples into the space at once.
|
CompletableFuture<R> |
replaceMany(Collection<T> tuples,
ReplaceManyOptions options)
Insert or replace several tuples into the space at once.
|
protected abstract CallResultMapper<R,SingleValueCallResult<R>> |
rowsMetadataTupleResultMapper()
MessagePack value mapper configured with an ArrayValue to tuple converter corresponding to the selected
tuple type
|
CompletableFuture<R> |
select(Conditions conditions)
Select tuples matching the specified query with options.
|
CompletableFuture<R> |
select(Conditions conditions,
SelectOptions options)
Select tuples matching the specified query with specified conditions and options.
|
String |
toString() |
CompletableFuture<Void> |
truncate()
Truncate space if space would be found.
|
CompletableFuture<R> |
update(Conditions conditions,
T tuple)
Update a tuple.
|
CompletableFuture<R> |
update(Conditions conditions,
T tuple,
UpdateOptions options)
Update a tuple.
|
CompletableFuture<R> |
update(Conditions conditions,
TupleOperations operations)
Update a tuple.
|
CompletableFuture<R> |
update(Conditions conditions,
TupleOperations operations,
UpdateOptions options)
Update a tuple.
|
CompletableFuture<R> |
upsert(Conditions conditions,
T tuple,
TupleOperations operations)
Update tuple if it would be found elsewhere try to insert tuple.
|
CompletableFuture<R> |
upsert(Conditions conditions,
T tuple,
TupleOperations operations,
UpsertOptions options)
Update tuple if it would be found elsewhere try to insert tuple.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcursor, cursorpublic ProxyTarantoolSpace(TarantoolClientConfig config, TarantoolCallOperations client, ProxyOperationsMappingConfig operationsMapping, TarantoolMetadataOperations metadata, TarantoolSpaceMetadata spaceMetadata)
public CompletableFuture<R> delete(Conditions conditions) throws TarantoolClientException
TarantoolSpaceOperationsdelete in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>conditions - query with optionsTarantoolClientException - in case if the request failedpublic CompletableFuture<R> delete(Conditions conditions, DeleteOptions options) throws TarantoolClientException
TarantoolSpaceOperationsdelete in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>conditions - query with optionsoptions - operation optionsTarantoolClientException - in case if the request failedpublic CompletableFuture<R> insert(T tuple) throws TarantoolClientException
TarantoolSpaceOperationsinsert in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>tuple - new dataTarantoolClientException - in case if request failedpublic CompletableFuture<R> insert(T tuple, InsertOptions options) throws TarantoolClientException
TarantoolSpaceOperationsinsert in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>tuple - new dataoptions - operation optionsTarantoolClientException - in case if request failedpublic CompletableFuture<R> insertMany(Collection<T> tuples)
TarantoolSpaceOperationsinsertMany in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>tuples - new datapublic CompletableFuture<R> insertMany(Collection<T> tuples, InsertManyOptions options) throws TarantoolClientException
TarantoolSpaceOperationsinsertMany in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>tuples - new dataoptions - operation optionsTarantoolClientException - in case if request failedpublic CompletableFuture<R> replace(T tuple) throws TarantoolClientException
TarantoolSpaceOperationsreplace in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>tuple - new dataTarantoolClientException - in case if request failedpublic CompletableFuture<R> replace(T tuple, ReplaceOptions options) throws TarantoolClientException
TarantoolSpaceOperationsreplace in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>tuple - new dataoptions - operation optionsTarantoolClientException - in case if request failedpublic CompletableFuture<R> replaceMany(Collection<T> tuples) throws TarantoolClientException
TarantoolSpaceOperationsreplaceMany in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>tuples - new dataTarantoolClientException - in case if request failedpublic CompletableFuture<R> replaceMany(Collection<T> tuples, ReplaceManyOptions options)
TarantoolSpaceOperationsreplaceMany in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>tuples - new dataoptions - operation optionspublic CompletableFuture<R> select(Conditions conditions) throws TarantoolClientException
TarantoolSpaceOperationsselect in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>conditions - query with optionsTarantoolClientException - in case if the request failedpublic CompletableFuture<R> select(Conditions conditions, SelectOptions options) throws TarantoolClientException
TarantoolSpaceOperationsselect in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>conditions - specified conditionsoptions - operation optionsTarantoolClientException - in case if the request failedpublic CompletableFuture<R> update(Conditions conditions, T tuple)
TarantoolSpaceOperationsupdate in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>conditions - query with optionstuple - tuple with new field valuespublic CompletableFuture<R> update(Conditions conditions, T tuple, UpdateOptions options)
TarantoolSpaceOperationsupdate in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>conditions - query with optionstuple - tuple with new field valuesoptions - operation optionsprotected abstract TupleOperations makeOperationsFromTuple(T tuple)
TupleOperations instance from the given tuple of type Ttuple - tuple of the specified typeTupleOperations instancepublic CompletableFuture<R> update(Conditions conditions, TupleOperations operations)
TarantoolSpaceOperationsupdate in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>conditions - query with optionsoperations - the list update operationspublic CompletableFuture<R> update(Conditions conditions, TupleOperations operations, UpdateOptions options)
TarantoolSpaceOperationsupdate in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>conditions - query with optionsoperations - the list update operationsoptions - operation optionspublic CompletableFuture<R> upsert(Conditions conditions, T tuple, TupleOperations operations)
TarantoolSpaceOperationsupsert in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>conditions - query with optionstuple - new data that will be insert if tuple will be not foundoperations - the list of update operations to be performed if the tuple existspublic CompletableFuture<R> upsert(Conditions conditions, T tuple, TupleOperations operations, UpsertOptions options)
TarantoolSpaceOperationsupsert in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>conditions - query with optionstuple - new data that will be insert if tuple will be not foundoperations - the list of update operations to be performed if the tuple existsoptions - operation optionspublic CompletableFuture<Void> truncate() throws TarantoolClientException
TarantoolSpaceOperationstruncate in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>TarantoolClientException - in case if request failedprotected abstract CallResultMapper<R,SingleValueCallResult<R>> rowsMetadataTupleResultMapper()
ArrayValue to T converterpublic TarantoolSpaceMetadata getMetadata()
TarantoolSpaceOperationsgetMetadata in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>Copyright © 2025 Picodata. All rights reserved.