@FunctionalInterface public interface LettuceConnectionProvider
connectionof on each invocation. Connection providers may create a new connection on each invocation or return pooled instances. Each obtained connection must be released through its connection provider to allow disposal or release back to the pool. Connection providers are usually associated with a
RedisCodecto create connections with an appropriate codec.
|Modifier and Type||Interface and Description|
|Modifier and Type||Method and Description|
Request a connection given
<T extends io.lettuce.core.api.StatefulConnection<?,?>> T getConnection(Class<T> connectionType)
connectionType. Providing a connection type allows specialization to provide a more specific connection type.
connectionType- must not be null.
releasedif the connection is no longer in use.
default void release(io.lettuce.core.api.StatefulConnection<?,?> connection)
connection. Closes connection
StatefulConnection.close()by default. Implementations may choose whether they override this method and return the connection to a pool.
connection- must not be null.
Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.