Skip to content

Commit

Permalink
Polishing #1100
Browse files Browse the repository at this point in the history
  • Loading branch information
mp911de committed Jul 30, 2019
1 parent 09f49b6 commit 0bb2cf6
Show file tree
Hide file tree
Showing 25 changed files with 46 additions and 46 deletions.
18 changes: 11 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand Down Expand Up @@ -77,7 +78,6 @@
<connection>scm:git:https://github.com/lettuce-io/lettuce-core.git</connection>
<developerConnection>scm:git:https://github.com/lettuce-io/lettuce-core.git</developerConnection>
<url>http://github.com/lettuce-io/lettuce-core</url>
<tag>HEAD</tag>
</scm>

<dependencyManagement>
Expand Down Expand Up @@ -673,6 +673,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down Expand Up @@ -723,6 +724,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>src</id>
Expand Down Expand Up @@ -865,7 +867,7 @@
<arguments>
<argument>-Xmx2G</argument>
<argument>-classpath</argument>
<classpath />
<classpath/>
<argument>org.openjdk.jmh.Main</argument>
<argument>.*</argument>
<argument>-tu</argument>
Expand Down Expand Up @@ -939,7 +941,9 @@
<phase>process-resources</phase>
<configuration>
<target>
<copy failonerror="false" file="${project.build.directory}/generated-docs/index.pdf" tofile="target/site/reference/pdf/lettuce-reference.pdf" />
<copy failonerror="false"
file="${project.build.directory}/generated-docs/index.pdf"
tofile="target/site/reference/pdf/lettuce-reference.pdf"/>
</target>
</configuration>
<goals>
Expand Down Expand Up @@ -1006,9 +1010,9 @@
<toclevels>3</toclevels>
<numbered>true</numbered>
<ext-doc>https://raw.githubusercontent.com/wiki/lettuce-io/lettuce-core/</ext-doc>
<allow-uri-read />
<docinfo />
<toc2 />
<allow-uri-read/>
<docinfo/>
<toc2/>
<icons>font</icons>
<source-highlighter>coderay</source-highlighter>
</attributes>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/lettuce/core/BitFieldArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

/**
* Argument list builder for the Redis <a href="http://redis.io/commands/bitfield">BITFIELD</a> command.
* <p/>
* <p>
* {@link BitFieldArgs} is a mutable object and instances should be used only once to avoid shared mutable state.
*
* @author Mark Paluch
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/lettuce/core/ClientOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public Builder cancelCommandsOnReconnectFailure(boolean cancelCommandsOnReconnec
/**
* Use a dedicated {@link reactor.core.scheduler.Scheduler} to emit reactive data signals. Enabling this option can be
* useful for reactive sequences that require a significant amount of processing with a single/a few Redis connections.
* <p/>
* <p>
* A single Redis connection operates on a single thread. Operations that require a significant amount of processing can
* lead to a single-threaded-like behavior for all consumers of the Redis connection. When enabled, data signals will be
* emitted using a different thread served by {@link ClientResources#eventExecutorGroup()}. Defaults to {@literal false}
Expand Down Expand Up @@ -329,7 +329,7 @@ public boolean isCancelCommandsOnReconnectFailure() {
/**
* Use a dedicated {@link reactor.core.scheduler.Scheduler} to emit reactive data signals. Enabling this option can be
* useful for reactive sequences that require a significant amount of processing with a single/a few Redis connections.
* <p/>
* <p>
* A single Redis connection operates on a single thread. Operations that require a significant amount of processing can
* lead to a single-threaded-like behavior for all consumers of the Redis connection. When enabled, data signals will be
* emitted using a different thread served by {@link ClientResources#eventExecutorGroup()}. Defaults to {@literal false} ,
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/io/lettuce/core/GeoArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

/**
*
* Argument list builder for the Redis <a href="http://redis.io/commands/georadius">GEORADIUS</a> and <a
* href="http://redis.io/commands/georadiusbymember">GEORADIUSBYMEMBER</a> commands.
* <p/>
* Argument list builder for the Redis <a href="http://redis.io/commands/georadius">GEORADIUS</a> and
* <a href="http://redis.io/commands/georadiusbymember">GEORADIUSBYMEMBER</a> commands.
* <p>
* {@link GeoArgs} is a mutable object and instances should be used only once to avoid shared mutable state.
*
* @author Mark Paluch
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/lettuce/core/GeoRadiusStoreArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/**
* Argument list builder for the Redis <a href="http://redis.io/commands/georadius">GEORADIUS</a> command to store
* {@literal GEORADIUS} results or {@literal GEORADIUS} distances in a sorted set.
* <p/>
* <p>
* {@link GeoRadiusStoreArgs} is a mutable object and instances should be used only once to avoid shared mutable state.
*
* @author Mark Paluch
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/lettuce/core/KillArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*
* Argument list builder for the Redis <a href="http://redis.io/commands/client-kill">CLIENT KILL</a> command. Static import the
* methods from {@link Builder} and chain the method calls: {@code id(1).skipme()}.
* <p/>
* <p>
* {@link KillArgs} is a mutable object and instances should be used only once to avoid shared mutable state.
*
* @author Mark Paluch
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/lettuce/core/MigrateArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/**
* Argument list builder for the Redis <a href="http://redis.io/commands/migrate">MIGRATE</a> command. Static import the methods
* from {@link Builder} and chain the method calls: {@code copy().auth("foobar")}.
* <p/>
* <p>
* {@link MigrateArgs} is a mutable object and instances should be used only once to avoid shared mutable state.
*
* @author Mark Paluch
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/lettuce/core/Operators.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
/**
* Operator utilities to handle noop subscriptions, validate request size and to cap concurrent additive operations to
* Long.MAX_VALUE, which is generic to {@link Subscription#request(long)} handling.
* <p/>
* <p>
* This class duplicates some methods from {@link reactor.core.publisher.Operators} to be independent from Reactor API changes.
*
* @author Mark Paluch
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/lettuce/core/RestoreArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/**
* Argument list builder for the Redis <a href="http://redis.io/commands/restore">RESTORE</a> command. Static import the methods
* from {@link RestoreArgs.Builder} and call the methods: {@code ttl(…)} .
* <p/>
* <p>
* {@link RestoreArgs} is a mutable object and instances should be used only once to avoid shared mutable state.
*
* @author Mark Paluch
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/lettuce/core/ScanArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* Argument list builder for the Redis scan commands ({@literal SCAN, HSCAN, SSCAN, ZSCAN}). Static import the methods from
*
* {@link Builder} and chain the method calls: {@code matches("weight_*").limit(0, 2)}.
* <p/>
* <p>
* {@link ScanArgs} is a mutable object and instances should be used only once to avoid shared mutable state.
*
* @author Mark Paluch
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/lettuce/core/SetArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* Argument list builder for the Redis <a href="http://redis.io/commands/set">SET</a> command starting from Redis 2.6.12. Static
* import the methods from {@link Builder} and chain the method calls: {@code ex(10).nx()}.
* <p/>
* <p>
* {@link SetArgs} is a mutable object and instances should be used only once to avoid shared mutable state.
*
* @author Will Glozer
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/lettuce/core/SocketOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public Builder keepAlive(boolean keepAlive) {
* Sets whether to disable Nagle's algorithm. Defaults to {@literal false} (Nagle enabled). See
* {@link #DEFAULT_SO_NO_DELAY}.
*
* @param tcpNoDelay {@literal true} to disable Nagle's algorithm, {@link false} to enable Nagle's algorithm.
* @param tcpNoDelay {@literal true} to disable Nagle's algorithm, {@literal false} to enable Nagle's algorithm.
* @return {@code this}
* @see java.net.SocketOptions#TCP_NODELAY
*/
Expand Down Expand Up @@ -186,7 +186,7 @@ public boolean isKeepAlive() {
/**
* Returns whether to use TCP NoDelay.
*
* @return {@literal true} to disable Nagle's algorithm, {@link false} to enable Nagle's algorithm.
* @return {@literal true} to disable Nagle's algorithm, {@literal false} to enable Nagle's algorithm.
* @see java.net.SocketOptions#TCP_NODELAY
*/
public boolean isTcpNoDelay() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/lettuce/core/SortArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/**
* Argument list builder for the Redis <a href="http://redis.io/commands/sort">SORT</a> command. Static import the methods from
* {@link Builder} and chain the method calls: {@code by("weight_*").desc().limit(0, 2)}.
* <p/>
* <p>
* {@link ScanArgs} is a mutable object and instances should be used only once to avoid shared mutable state.
*
* @author Will Glozer
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/lettuce/core/XAddArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/**
* Argument list builder for the Redis <a href="http://redis.io/commands/xadd">XADD</a> command. Static import the methods from
* {@link Builder} and call the methods: {@code maxlen(…)} .
* <p/>
* <p>
* {@link XAddArgs} is a mutable object and instances should be used only once to avoid shared mutable state.
*
* @author Mark Paluch
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/lettuce/core/XClaimArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/**
* Argument list builder for the Redis <a href="http://redis.io/commands/xclaim">XCLAIM</a> command. Static import the methods
* from {@link XClaimArgs.Builder} and call the methods: {@code minIdleTime(…)} .
* <p/>
* <p>
* {@link XClaimArgs} is a mutable object and instances should be used only once to avoid shared mutable state.
*
* @author Mark Paluch
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/lettuce/core/XReadArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/**
* Argument list builder for the Redis <a href="http://redis.io/commands/xread">XREAD</a> and {@literal XREADGROUP} commands.
* Static import the methods from {@link XReadArgs.Builder} and call the methods: {@code block(…)} .
* <p/>
* <p>
* {@link XReadArgs} is a mutable object and instances should be used only once to avoid shared mutable state.
*
* @author Mark Paluch
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/lettuce/core/ZAddArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* Argument list builder for the improved Redis <a href="http://redis.io/commands/zadd">ZADD</a> command starting from Redis
* 3.0.2. Static import the methods from {@link Builder} and call the methods: {@code xx()} or {@code nx()} .
* <p/>
* <p>
* {@link ZAddArgs} is a mutable object and instances should be used only once to avoid shared mutable state.
*
* @author Mark Paluch
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/io/lettuce/core/ZStoreArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
import io.lettuce.core.protocol.CommandArgs;

/**
* Argument list builder for the Redis <a href="http://redis.io/commands/zunionstore">ZUNIONSTORE</a> and <a
* href="http://redis.io/commands/zinterstore">ZINTERSTORE</a> commands. Static import the methods from {@link Builder} and
* Argument list builder for the Redis <a href="http://redis.io/commands/zunionstore">ZUNIONSTORE</a> and
* <a href="http://redis.io/commands/zinterstore">ZINTERSTORE</a> commands. Static import the methods from {@link Builder} and
* chain the method calls: {@code weights(1, 2).max()}.
*
* <p/>
* <p>
* {@link ZAddArgs} is a mutable object and instances should be used only once to avoid shared mutable state.
*
* @author Will Glozer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,11 @@ public interface RedisServerAsyncCommands<K, V> {

/**
* Make the server crash: Out of memory.
*
* @return nothing, because the server crashes before returning.
*/
void debugOom();

/**
* Make the server crash: Invalid pointer access.
*
* @return nothing, because the server crashes before returning.
*/
void debugSegfault();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@

/**
* Representation of a Redis Cluster node. A {@link RedisClusterNode} is identified by its {@code nodeId}.
* <p/>
* <p>
* A {@link RedisClusterNode} can be a {@link #getRole() responsible master} or slave. Masters can be responsible for zero to
* {@link io.lettuce.core.cluster.SlotHash#SLOT_COUNT 16384} slots. Each slave refers to exactly one {@link #getSlaveOf()
* master}. Nodes can have different {@link io.lettuce.core.cluster.models.partitions.RedisClusterNode.NodeFlag flags} assigned.
* <p/>
* <p>
* This class is mutable and not thread-safe if mutated by multiple threads concurrently.
*
* @author Mark Paluch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Completable latch support expecting an number of inbound events to trigger an outbound event signalled though a
* {@link CompletionStage}. This latch is created by specifying a number of expected events of type {@code T} or exceptions and
* synchronized through either a timeout or receiving the matching number of events.
* <p/>
* <p>
* Inbound events can be consumed through callback hook methods. Events arriving after synchronization are dropped.
*
* @author Mark Paluch
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/lettuce/core/masterslave/Connections.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
/**
* Connection collector with non-blocking synchronization. This synchronizer emits itself through a {@link Mono} as soon as it
* gets synchronized via either receiving connects/exceptions from all connections or timing out.
* <p/>
* <p>
* It can be used only once via {@link #getOrTimeout(Duration, ScheduledExecutorService)}.
* <p/>
* <p>
* Synchronizer uses a gate to determine whether it was already emitted or awaiting incoming events (exceptions, successful
* connects). Connections arriving after closing the gate are discarded.
*
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/io/lettuce/core/resource/ClientResources.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ interface Builder {
* Sets the {@link CommandLatencyCollectorOptions} that can that can be used across different instances of the
* RedisClient. The options are only effective if no {@code commandLatencyCollector} is provided.
*
* @param commandLatencyCollectorOptions the command latency collector options, must not be {@link null}.
* @param commandLatencyCollectorOptions the command latency collector options, must not be {@literal null}.
* @return {@code this} {@link Builder}.
*/
Builder commandLatencyCollectorOptions(CommandLatencyCollectorOptions commandLatencyCollectorOptions);
Expand All @@ -116,7 +116,7 @@ interface Builder {
* Sets the {@link SocketAddressResolver} that is used to resolve {@link io.lettuce.core.RedisURI} to
* {@link java.net.SocketAddress}. Defaults to {@link SocketAddressResolver} using the configured {@link DnsResolver}.
*
* @param socketAddressResolver the socket address resolver, must not be {@link null}.
* @param socketAddressResolver the socket address resolver, must not be {@literal null}.
* @return {@code this} {@link Builder}.
* @since 5.1
*/
Expand All @@ -126,7 +126,7 @@ interface Builder {
* Sets the {@link DnsResolver} that is used to resolve hostnames to {@link java.net.InetAddress}. Defaults to
* {@link DnsResolvers#JVM_DEFAULT}
*
* @param dnsResolver the DNS resolver, must not be {@link null}.
* @param dnsResolver the DNS resolver, must not be {@literal null}.
* @return {@code this} {@link Builder}.
* @since 4.3
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ public Builder commandLatencyPublisherOptions(EventPublisherOptions commandLaten
* Sets the {@link CommandLatencyCollectorOptions} that can that can be used across different instances of the
* RedisClient. The options are only effective if no {@code commandLatencyCollector} is provided.
*
* @param commandLatencyCollectorOptions the command latency collector options, must not be {@link null}.
* @param commandLatencyCollectorOptions the command latency collector options, must not be {@literal null}.
* @return {@code this} {@link Builder}.
*/
@Override
Expand Down Expand Up @@ -427,7 +427,7 @@ public Builder commandLatencyCollector(CommandLatencyCollector commandLatencyCol
* Sets the {@link SocketAddressResolver} that is used to resolve {@link io.lettuce.core.RedisURI} to
* {@link java.net.SocketAddress}. Defaults to {@link SocketAddressResolver} using the configured {@link DnsResolver}.
*
* @param socketAddressResolver the socket address resolver, must not be {@link null}.
* @param socketAddressResolver the socket address resolver, must not be {@literal null}.
* @return {@code this} {@link ClientResources.Builder}.
* @since 5.1
*/
Expand All @@ -444,7 +444,7 @@ public ClientResources.Builder socketAddressResolver(SocketAddressResolver socke
* Sets the {@link DnsResolver} that is used to resolve hostnames to {@link java.net.InetAddress}. Defaults to
* {@link DnsResolvers#JVM_DEFAULT}
*
* @param dnsResolver the DNS resolver, must not be {@link null}.
* @param dnsResolver the DNS resolver, must not be {@literal null}.
* @return {@code this} {@link Builder}.
* @since 4.3
*/
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/lettuce/core/tracing/BraveTracing.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* {@link io.lettuce.core.tracing.Tracer.Span} to trace the actual command. A parent {@link brave.Span} is picked up for
* imperative (synchronous/asynchronous) API usage from {@link brave.Tracing#currentTracer()}. The context is not propagated
* across asynchronous call chains resulting from {@link java.util.concurrent.CompletionStage} chaining.
* <p/>
* <p>
* Reactive API usage leverages Reactor's {@link reactor.util.context.Context} so that subscribers can register one of the
* following objects (using their {@link Class} as context key):
*
Expand Down

0 comments on commit 0bb2cf6

Please sign in to comment.