public abstract class TarantoolSpace<T extends Packable,R extends Collection<T>> extends Object implements TarantoolSpaceOperations<T,R>
Constructor and Description |
---|
TarantoolSpace(TarantoolClientConfig config,
TarantoolConnectionManager connectionManager,
TarantoolMetadataOperations metadataOperations,
TarantoolSpaceMetadata spaceMetadata) |
Modifier and Type | Method and Description |
---|---|
protected abstract MessagePackValueMapper |
arrayTupleResultMapper()
MessagePack value mapper configured with an ArrayValue to tuple converter corresponding to the selected
tuple type
|
CompletableFuture<R> |
delete(Conditions conditions)
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> |
insertMany(Collection<T> tuples)
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> |
replaceMany(Collection<T> tuples)
Insert or replace several tuples into the space at once.
|
CompletableFuture<R> |
select(Conditions conditions)
Select tuples matching the specified query with 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,
TupleOperations operations)
Update a tuple.
|
CompletableFuture<R> |
upsert(Conditions conditions,
T tuple,
TupleOperations operations)
Update tuple if it would be found elsewhere try to insert tuple.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
cursor, cursor, delete, insert, insertMany, replace, replaceMany, select, update, update, upsert
public TarantoolSpace(TarantoolClientConfig config, TarantoolConnectionManager connectionManager, TarantoolMetadataOperations metadataOperations, TarantoolSpaceMetadata spaceMetadata)
public CompletableFuture<R> delete(Conditions conditions) throws TarantoolClientException
TarantoolSpaceOperations
delete
in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>
conditions
- query with optionsTarantoolClientException
- in case if the request failedpublic CompletableFuture<R> insert(T tuple) throws TarantoolClientException
TarantoolSpaceOperations
insert
in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>
tuple
- new dataTarantoolClientException
- in case if request failedpublic CompletableFuture<R> insertMany(Collection<T> tuples) throws TarantoolClientException
TarantoolSpaceOperations
insertMany
in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>
tuples
- new dataTarantoolClientException
- in case if request failedpublic CompletableFuture<R> replace(T tuple) throws TarantoolClientException
TarantoolSpaceOperations
replace
in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>
tuple
- new dataTarantoolClientException
- in case if request failedpublic CompletableFuture<R> replaceMany(Collection<T> tuples) throws TarantoolClientException
TarantoolSpaceOperations
replaceMany
in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>
tuples
- new dataTarantoolClientException
- in case if request failedpublic CompletableFuture<R> select(Conditions conditions) throws TarantoolClientException
TarantoolSpaceOperations
select
in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>
conditions
- query with optionsTarantoolClientException
- in case if the request failedpublic CompletableFuture<R> update(Conditions conditions, T tuple)
TarantoolSpaceOperations
update
in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>
conditions
- query with optionstuple
- tuple with new field valuesprotected abstract TupleOperations makeOperationsFromTuple(T tuple)
TupleOperations
instance from the given tuple of type T
tuple
- tuple of the specified typeTupleOperations
instancepublic CompletableFuture<R> update(Conditions conditions, TupleOperations operations)
TarantoolSpaceOperations
update
in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>
conditions
- query with optionsoperations
- the list update operationspublic CompletableFuture<R> upsert(Conditions conditions, T tuple, TupleOperations operations)
TarantoolSpaceOperations
upsert
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<Void> truncate() throws TarantoolClientException
TarantoolSpaceOperations
truncate
in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>
TarantoolClientException
- in case if request failedprotected abstract MessagePackValueMapper arrayTupleResultMapper()
ArrayValue
to T
converterpublic TarantoolSpaceMetadata getMetadata()
TarantoolSpaceOperations
getMetadata
in interface TarantoolSpaceOperations<T extends Packable,R extends Collection<T>>
Copyright © 2025 Picodata. All rights reserved.