Class RedisConnection
- All Implemented Interfaces:
MutinyDelegate,ReadStream<io.vertx.redis.client.Response>,StreamBase
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- See Also:
-
RedisConnection
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vertx.mutiny.core.streams.ReadStream
ReadStream.ReadStreamImpl<T>Nested classes/interfaces inherited from interface io.vertx.mutiny.core.streams.StreamBase
StreamBase.StreamBaseImpl -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRedisConnection(io.vertx.redis.client.RedisConnection delegate) Create a new instance ofRedisConnectiondelegating to the given (non-null) instance ofRedisConnection.RedisConnection(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<List<io.vertx.redis.client.Response>>Sends a list of commands in a single IO operation, this prevents any inter twinning to happen from other client users.List<io.vertx.redis.client.Response>batchAndAwait(List<io.vertx.redis.client.Request> commands) Sends a list of commands in a single IO operation, this prevents any inter twinning to happen from other client users.batchAndForget(List<io.vertx.redis.client.Request> commands) Sends a list of commands in a single IO operation, this prevents any inter twinning to happen from other client users.io.smallrye.mutiny.Uni<Void>close()Closes the connection or returns to the pool.voidCloses the connection or returns to the pool.Closes the connection or returns to the pool.endHandler(Runnable endHandler) Set an end handler.booleanexceptionHandler(Consumer<Throwable> handler) Set an exception handler on the read stream.fetch(long amount) Fetch the specifiedamountof elements.io.vertx.redis.client.RedisConnectionGet the delegate instance.Set a data handler.inthashCode()static RedisConnectionnewInstance(io.vertx.redis.client.RedisConnection delegate) Creates a new instance of theRedisConnection.pause()Pause theReadStream, it sets the buffer infetchmode and clears the actual demand.booleanFlag to notify if the pending message queue (commands in transit) is full.Pipe<io.vertx.redis.client.Response>pipe()Pause this stream and return aPipeto transfer the elements of this stream to a destinationWriteStream.io.smallrye.mutiny.Uni<Void>pipeTo(WriteStream<io.vertx.redis.client.Response> dst) Pipe thisReadStreamto theWriteStream.voidpipeToAndAwait(WriteStream<io.vertx.redis.client.Response> dst) Pipe thisReadStreamto theWriteStream.pipeToAndForget(WriteStream<io.vertx.redis.client.Response> dst) Pipe thisReadStreamto theWriteStream.resume()Resume reading, and sets the buffer inflowingmode.io.smallrye.mutiny.Uni<io.vertx.redis.client.Response>send(io.vertx.redis.client.Request command) Send the given command to the redis server or cluster.io.vertx.redis.client.ResponsesendAndAwait(io.vertx.redis.client.Request command) Send the given command to the redis server or cluster.sendAndForget(io.vertx.redis.client.Request command) Send the given command to the redis server or cluster.Iterable<io.vertx.redis.client.Response>Stream<io.vertx.redis.client.Response>io.smallrye.mutiny.Multi<io.vertx.redis.client.Response>toMulti()toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
RedisConnection
public RedisConnection(io.vertx.redis.client.RedisConnection delegate) Create a new instance ofRedisConnectiondelegating to the given (non-null) instance ofRedisConnection. -
RedisConnection
-
-
Method Details
-
getDelegate
public io.vertx.redis.client.RedisConnection getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Specified by:
getDelegatein interfaceReadStream<io.vertx.redis.client.Response>- Specified by:
getDelegatein interfaceStreamBase- Returns:
- the delegate instance
-
send
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.redis.client.Response> send(io.vertx.redis.client.Request command) Send the given command to the redis server or cluster.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
command- the command to send- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
RedisConnection.send(Request)
-
sendAndAwait
public io.vertx.redis.client.Response sendAndAwait(io.vertx.redis.client.Request command) Send the given command to the redis server or cluster.Unlike the bare Vert.x variant, this method returns a
Response. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
command- the command to send- Returns:
- The operation result
- See Also:
-
RedisConnection.send(Request)
-
sendAndForget
Send the given command to the redis server or cluster.Unlike the bare Vert.x variant, this method ignores the
Responseresult or any failure.- Parameters:
command- the command to send- Returns:
- The current instance to chain operations if needed.
- See Also:
-
RedisConnection.send(Request)
-
batch
@CheckReturnValue public io.smallrye.mutiny.Uni<List<io.vertx.redis.client.Response>> batch(List<io.vertx.redis.client.Request> commands) Sends a list of commands in a single IO operation, this prevents any inter twinning to happen from other client users.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
commands- list of command to send- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
RedisConnection.batch(List)
-
batchAndAwait
public List<io.vertx.redis.client.Response> batchAndAwait(List<io.vertx.redis.client.Request> commands) Sends a list of commands in a single IO operation, this prevents any inter twinning to happen from other client users.Unlike the bare Vert.x variant, this method returns a
List<io.vertx.redis.client.Response>. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
commands- list of command to send- Returns:
- The operation result
- See Also:
-
RedisConnection.batch(List)
-
batchAndForget
Sends a list of commands in a single IO operation, this prevents any inter twinning to happen from other client users.Unlike the bare Vert.x variant, this method ignores the
List<io.vertx.redis.client.Response>result or any failure.- Parameters:
commands- list of command to send- Returns:
- The current instance to chain operations if needed.
- See Also:
-
RedisConnection.batch(List)
-
close
Closes the connection or returns to the pool.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
RedisConnection.close()
-
closeAndAwait
public void closeAndAwait()Closes the connection or returns to the pool.Unlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- See Also:
-
RedisConnection.close()
-
closeAndForget
Closes the connection or returns to the pool.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
RedisConnection.close()
-
pipeTo
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> pipeTo(WriteStream<io.vertx.redis.client.Response> dst) Pipe thisReadStreamto theWriteStream.Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Specified by:
pipeToin interfaceReadStream<io.vertx.redis.client.Response>- Parameters:
dst- the destination write stream- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
io.vertx.redis.client.RedisConnection#pipeTo(WriteStream)
-
pipeToAndAwait
Pipe thisReadStreamto theWriteStream.Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Unlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
dst- the destination write stream- See Also:
-
io.vertx.redis.client.RedisConnection#pipeTo(WriteStream)
-
pipeToAndForget
Pipe thisReadStreamto theWriteStream.Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Parameters:
dst- the destination write stream- Returns:
- The current instance to chain operations if needed.
- See Also:
-
io.vertx.redis.client.RedisConnection#pipeTo(WriteStream)
-
exceptionHandler
Set an exception handler on the read stream.- Specified by:
exceptionHandlerin interfaceReadStream<io.vertx.redis.client.Response>- Specified by:
exceptionHandlerin interfaceStreamBase- Parameters:
handler- the exception handler. Can benull.- Returns:
- a reference to this, so the API can be used fluently
-
handler
Set a data handler. As data is read, the handler will be called with the data.- Specified by:
handlerin interfaceReadStream<io.vertx.redis.client.Response>- Returns:
- a reference to this, so the API can be used fluently
-
pause
Pause theReadStream, it sets the buffer infetchmode and clears the actual demand.While it's paused, no data will be sent to the data
handler.- Specified by:
pausein interfaceReadStream<io.vertx.redis.client.Response>- Returns:
- a reference to this, so the API can be used fluently
-
resume
Resume reading, and sets the buffer inflowingmode. If theReadStreamhas been paused, reading will recommence on it.- Specified by:
resumein interfaceReadStream<io.vertx.redis.client.Response>- Returns:
- a reference to this, so the API can be used fluently
-
fetch
Fetch the specifiedamountof elements. If theReadStreamhas been paused, reading will recommence with the specifiedamountof items, otherwise the specifiedamountwill be added to the current stream demand.- Specified by:
fetchin interfaceReadStream<io.vertx.redis.client.Response>- Returns:
- a reference to this, so the API can be used fluently
-
endHandler
Set an end handler. Once the stream has ended, and there is no more data to be read, this handler will be called.- Specified by:
endHandlerin interfaceReadStream<io.vertx.redis.client.Response>- Returns:
- a reference to this, so the API can be used fluently
-
pendingQueueFull
public boolean pendingQueueFull()Flag to notify if the pending message queue (commands in transit) is full.When the pending message queue is full and a new send command is issued it will result in a exception to be thrown. Checking this flag before sending can allow the application to wait before sending the next message.
- Returns:
- true is queue is full.
-
pipe
Pause this stream and return aPipeto transfer the elements of this stream to a destinationWriteStream. The stream will be resumed when the pipe will be wired to aWriteStream.- Specified by:
pipein interfaceReadStream<io.vertx.redis.client.Response>- Returns:
- a pipe
-
newInstance
Creates a new instance of theRedisConnection. -
hashCode
public int hashCode() -
equals
-
toString
-
toMulti
@CheckReturnValue public io.smallrye.mutiny.Multi<io.vertx.redis.client.Response> toMulti() -
toBlockingIterable
-
toBlockingStream
-