public abstract class RedisAccessor extends Object implements AutoCloseable
限定符和类型 | 字段和说明 |
---|---|
protected RedisConnectionFactory |
connectionFactory |
protected DataSource |
dataSource |
protected static Options |
DEFAULT_OPTIONS |
protected static Serializer |
DEFAULT_SERIALIZER |
protected boolean |
enableTransactionSupport |
protected static ThreadLocal<Integer> |
index |
protected Options |
options |
protected Serializer |
serializer |
protected static ThreadLocal<Map<Integer,Function<?,?>>> |
txConverters |
构造器和说明 |
---|
RedisAccessor()
构造函数
|
RedisAccessor(DataSource dataSource)
构造函数
|
限定符和类型 | 方法和说明 |
---|---|
void |
afterPropertiesSet() |
protected void |
checkInitialized() |
void |
close() |
protected RedisClient |
doGetRedisClient() |
<R> R |
execute(SessionCallback<R> callback) |
<SR,TR> TR |
execute(SessionCallback<SR> callback,
com.buession.redis.Converter<SR,TR> converter) |
protected RedisConnection |
fetchConnection() |
RedisConnectionFactory |
getConnectionFactory() |
DataSource |
getDataSource() |
Options |
getOptions() |
protected static Map<Integer,Function<?,?>> |
getTxConverters() |
protected boolean |
isPipeline(RedisConnection connection) |
protected boolean |
isTransaction(RedisConnection connection) |
protected boolean |
isTransactionOrPipeline(RedisConnection connection) |
void |
pipeline() |
protected void |
resetTransactionOrPipeline() |
void |
setDataSource(DataSource dataSource) |
void |
setOptions(Options options) |
protected static final Options DEFAULT_OPTIONS
protected static final Serializer DEFAULT_SERIALIZER
protected Options options
protected Serializer serializer
protected DataSource dataSource
protected RedisConnectionFactory connectionFactory
protected boolean enableTransactionSupport
protected static final ThreadLocal<Map<Integer,Function<?,?>>> txConverters
protected static final ThreadLocal<Integer> index
public RedisAccessor()
public RedisAccessor(DataSource dataSource)
dataSource
- 数据源public Options getOptions()
public void setOptions(Options options)
@Nullable public RedisConnectionFactory getConnectionFactory()
@Nullable public DataSource getDataSource()
public void setDataSource(DataSource dataSource)
public void afterPropertiesSet() throws RedisException
RedisException
public void pipeline()
public <R> R execute(SessionCallback<R> callback) throws RedisException
RedisException
public <SR,TR> TR execute(SessionCallback<SR> callback, com.buession.redis.Converter<SR,TR> converter) throws RedisException
RedisException
public void close() throws Exception
close
在接口中 AutoCloseable
Exception
protected RedisConnection fetchConnection()
protected RedisClient doGetRedisClient() throws RedisException
RedisException
protected final void checkInitialized()
protected boolean isTransaction(RedisConnection connection)
protected boolean isPipeline(RedisConnection connection)
protected boolean isTransactionOrPipeline(RedisConnection connection)
protected void resetTransactionOrPipeline()
Copyright © 2023 buession.com Inc.. All rights reserved.