Package glide.api.models.commands.stream
Class StreamClaimOptions.StreamClaimOptionsBuilder
- java.lang.Object
-
- glide.api.models.commands.stream.StreamClaimOptions.StreamClaimOptionsBuilder
-
- Enclosing class:
- StreamClaimOptions
public static class StreamClaimOptions.StreamClaimOptionsBuilder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StreamClaimOptionsbuild()StreamClaimOptions.StreamClaimOptionsBuilderforce()Creates the pending message entry in the PEL even if certain specified IDs are not already in the PEL assigned to a different client.StreamClaimOptions.StreamClaimOptionsBuilderidle(java.lang.Long idle)Set the idle time (last time it was delivered) of the message in milliseconds.StreamClaimOptions.StreamClaimOptionsBuilderidleUnixTime(java.lang.Long idleUnixTime)This is the same asidlebut instead of a relative amount of milliseconds, it sets the idle time to a specific Unix time (in milliseconds).StreamClaimOptions.StreamClaimOptionsBuilderisForce(boolean isForce)Creates the pending message entry in the PEL even if certain specified IDs are not already in the PEL assigned to a different client.StreamClaimOptions.StreamClaimOptionsBuilderretryCount(java.lang.Long retryCount)Set the retry counter to the specified value.java.lang.StringtoString()
-
-
-
Method Detail
-
force
public StreamClaimOptions.StreamClaimOptionsBuilder force()
Creates the pending message entry in the PEL even if certain specified IDs are not already in the PEL assigned to a different client. However, the message must exist in the stream, otherwise the IDs of non-existing messages are ignored.
-
idle
public StreamClaimOptions.StreamClaimOptionsBuilder idle(java.lang.Long idle)
Set the idle time (last time it was delivered) of the message in milliseconds. Ifidleis not specified, anidleof0is assumed, that is, the time count is reset because the message now has a new owner trying to process it.- Returns:
this.
-
idleUnixTime
public StreamClaimOptions.StreamClaimOptionsBuilder idleUnixTime(java.lang.Long idleUnixTime)
This is the same asidlebut instead of a relative amount of milliseconds, it sets the idle time to a specific Unix time (in milliseconds). This is useful in order to rewrite the AOF file generatingXCLAIMcommands.- Returns:
this.
-
retryCount
public StreamClaimOptions.StreamClaimOptionsBuilder retryCount(java.lang.Long retryCount)
Set the retry counter to the specified value. This counter is incremented every time a message is delivered again. NormallyStreamBaseCommands.xclaim(java.lang.String, java.lang.String, java.lang.String, long, java.lang.String[])does not alter this counter, which is just served to clients when theStreamBaseCommands.xpending(java.lang.String, java.lang.String)command is called: this way clients can detect anomalies, like messages that are never processed for some reason after a big number of delivery attempts.- Returns:
this.
-
isForce
public StreamClaimOptions.StreamClaimOptionsBuilder isForce(boolean isForce)
Creates the pending message entry in the PEL even if certain specified IDs are not already in the PEL assigned to a different client. However, the message must exist in the stream, otherwise the IDs of non-existing messages are ignored.- Returns:
this.
-
build
public StreamClaimOptions build()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-