Interface TarantoolSpaceOperations<T extends Packable,​R extends Collection<T>>

    • Method Detail

      • insert

        CompletableFuture<R> insert​(T tuple)
                             throws TarantoolClientException
        Inserts tuple into the space, if no tuple with same unique keys exists. Otherwise throw duplicate key error.
        Parameters:
        tuple - new data
        Returns:
        a future that will contain all corresponding tuples once completed
        Throws:
        TarantoolClientException - in case if request failed
      • update

        CompletableFuture<R> update​(Conditions conditions,
                                    T tuple)
        Update a tuple. Only a single primary index value condition is supported.
        Parameters:
        conditions - query with options
        tuple - tuple with new field values
        Returns:
        a future that will contain corresponding tuple once completed
        Throws:
        TarantoolClientException - in case if the request failed
      • update

        CompletableFuture<R> update​(Conditions conditions,
                                    TupleOperations operations)
        Update a tuple. Only a single primary index value condition is supported.
        Parameters:
        conditions - query with options
        operations - the list update operations
        Returns:
        a future that will contain corresponding tuple once completed
        Throws:
        TarantoolClientException - in case if the request failed
      • upsert

        CompletableFuture<R> upsert​(Conditions conditions,
                                    T tuple,
                                    TupleOperations operations)
        Update tuple if it would be found elsewhere try to insert tuple. Only a single primary index value condition is supported.
        Parameters:
        conditions - query with options
        tuple - new data that will be insert if tuple will be not found
        operations - the list of update operations to be performed if the tuple exists
        Returns:
        a future that will empty list
        Throws:
        TarantoolClientException - in case if the request failed
      • getMetadata

        TarantoolSpaceMetadata getMetadata()
        Get metadata associated with this space
        Returns:
        space metadata
      • cursor

        TarantoolCursor<T> cursor​(Conditions conditions,
                                  int batchSize)
        Cursor is an iterator-like object that is able to scroll through results of a query. Unlike a single cursor loads new tuples dynamically issuing requests to server. Select will fetch tuples matching the specified query. Each request to server will fetch no more than 'batch size' tuples.
        Parameters:
        conditions - query with options
        batchSize - size of a batch of single client request
        Returns:
        cursor that can iterate through all corresponding tuples