Class RedisConnection
- All Implemented Interfaces:
MutinyDelegate,ReadStream<Response>,StreamBase
original non Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRedisConnection(io.vertx.redis.client.RedisConnection delegate) RedisConnection(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionSends a list of commands in a single IO operation, this prevents any inter twinning to happen from other client users.batchAndAwait(List<Request> commands) Blocking variant ofbatch(List).batchAndForget(List<Request> commands) Variant ofbatch(List)that ignores the result of the operation.io.smallrye.mutiny.Uni<Void>close()Closes the connection or returns to the pool.Blocking variant ofclose().Variant ofclose()that ignores the result of the operation.endHandler(Runnable endHandler) booleanexceptionHandler(Consumer<Throwable> handler) fetch(long amount) io.vertx.redis.client.RedisConnectioninthashCode()static RedisConnectionnewInstance(io.vertx.redis.client.RedisConnection arg) pause()booleanpipe()io.smallrye.mutiny.Uni<Void>pipeTo(WriteStream<Response> dst) Pipe thisReadStreamto theWriteStream.Blocking variant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream).voidVariant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)that ignores the result of the operation.resume()io.smallrye.mutiny.Uni<Response>Send the given command to the redis server or cluster.sendAndAwait(Request command) Blocking variant ofsend(io.vertx.mutiny.redis.client.Request).sendAndForget(Request command) Variant ofsend(io.vertx.mutiny.redis.client.Request)that ignores the result of the operation.io.smallrye.mutiny.Multi<Response>toMulti()toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
RedisConnection
public RedisConnection(io.vertx.redis.client.RedisConnection delegate) -
RedisConnection
-
-
Method Details
-
getDelegate
public io.vertx.redis.client.RedisConnection getDelegate()- Specified by:
getDelegatein interfaceMutinyDelegate- Specified by:
getDelegatein interfaceReadStream<Response>- Specified by:
getDelegatein interfaceStreamBase- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
pipe
- Specified by:
pipein interfaceReadStream<Response>- Returns:
- a pipe
-
pipeTo
Description copied from interface:ReadStreamPipe thisReadStreamto theWriteStream.Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the
handlerwill be called with the result.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Specified by:
pipeToin interfaceReadStream<Response>- Parameters:
dst- the destination write stream- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
pipeToAndAwait
Description copied from interface:ReadStreamBlocking variant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream).This method waits 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 a RuntimeException).
- Specified by:
pipeToAndAwaitin interfaceReadStream<Response>- Parameters:
dst- the destination write stream- Returns:
- the Void instance produced by the operation.
-
pipeToAndForget
Description copied from interface:ReadStreamVariant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)that ignores the result of the operation.This method subscribes on the result of
ReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)but you don't need to compose it with other operations.- Specified by:
pipeToAndForgetin interfaceReadStream<Response>- Parameters:
dst- the destination write stream
-
exceptionHandler
- Specified by:
exceptionHandlerin interfaceReadStream<Response>- Specified by:
exceptionHandlerin interfaceStreamBase- Parameters:
handler-- Returns:
-
handler
- Specified by:
handlerin interfaceReadStream<Response>- Parameters:
handler-- Returns:
-
pause
- Specified by:
pausein interfaceReadStream<Response>- Returns:
- the instance of RedisConnection to chain method calls.
-
resume
- Specified by:
resumein interfaceReadStream<Response>- Returns:
- the instance of RedisConnection to chain method calls.
-
fetch
- Specified by:
fetchin interfaceReadStream<Response>- Parameters:
amount-- Returns:
- the instance of RedisConnection to chain method calls.
-
endHandler
- Specified by:
endHandlerin interfaceReadStream<Response>- Parameters:
endHandler-- Returns:
-
send
Send the given command to the redis server or cluster.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
command- the command to send- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
sendAndAwait
Blocking variant ofsend(io.vertx.mutiny.redis.client.Request).This method waits 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 a RuntimeException).
- Parameters:
command- the command to send- Returns:
- the Response instance produced by the operation.
-
sendAndForget
Variant ofsend(io.vertx.mutiny.redis.client.Request)that ignores the result of the operation.This method subscribes on the result of
send(io.vertx.mutiny.redis.client.Request), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromsend(io.vertx.mutiny.redis.client.Request)but you don't need to compose it with other operations.- Parameters:
command- the command to send- Returns:
- the instance of RedisConnection to chain method calls.
-
batch
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. Don't forget to subscribe on it to trigger the operation.- Parameters:
commands- list of command to send- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
batchAndAwait
Blocking variant ofbatch(List).This method waits 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 a RuntimeException).
- Parameters:
commands- list of command to send- Returns:
- the List
instance produced by the operation.
-
batchAndForget
Variant ofbatch(List)that ignores the result of the operation.This method subscribes on the result of
batch(List), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation frombatch(List)but you don't need to compose it with other operations.- Parameters:
commands- list of command to send- Returns:
- the instance of RedisConnection to chain method calls.
-
close
Closes the connection or returns to the pool.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
closeAndAwait
Blocking variant ofclose().This method waits 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 a RuntimeException).
- Returns:
- the Void instance produced by the operation.
-
closeAndForget
Variant ofclose()that ignores the result of the operation.This method subscribes on the result of
close(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromclose()but you don't need to compose it with other operations.- Returns:
- the instance of RedisConnection to chain method calls.
-
pendingQueueFull
public boolean pendingQueueFull()- Returns:
- true is queue is full.
-
toMulti
- Specified by:
toMultiin interfaceReadStream<Response>
-
toBlockingIterable
-
toBlockingStream
-
newInstance
-