public abstract class AbstractRedisThread<E> extends AbstractQueueThread<E>
LinkedBlockingDequeThread.State, Thread.UncaughtExceptionHandler| 限定符和类型 | 字段和说明 |
|---|---|
protected Condition |
condition
激活与休眠线程
|
protected ReentrantLock |
lock
锁
|
protected RedisHelper |
redisHelper |
protected boolean |
run
是否正在运行
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| 构造器和说明 |
|---|
AbstractRedisThread() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected E |
convertToObj(String str)
string 转换成 对象
|
protected String |
convertToString(E e)
对象 转换成 string.
|
protected String |
get()
从redis中获取数据
忽略sonar 警告.
|
abstract String |
getKey()
获取数据存储的key
|
protected Type |
getObjType()
获取目标对象的type , 即 E 的实际类型.
|
boolean |
isRun() |
E |
poll(long time) |
void |
put(E e) |
protected void |
shutdown(List<E> list) |
error, fillList, getBatchSize, getBatchTimeout, getPollTimeout, init, onApplicationStart, onApplicationStop, poll, preProcess, process, receiveProcess, runactiveCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield@Autowired protected RedisHelper redisHelper
protected boolean run
protected final ReentrantLock lock
protected final Condition condition
public abstract String getKey()
protected String convertToString(@NotNull E e)
e - 对象protected Type getObjType()
@Nullable protected E convertToObj(String str)
str - stringpublic void put(E e)
put 在类中 AbstractQueueThread<E>protected String get()
忽略sonar 警告. 子类有可能需要在get时做其他操作.
@Nullable public E poll(long time) throws InterruptedException
poll 在类中 AbstractQueueThread<E>InterruptedExceptionprotected void shutdown(List<E> list)
shutdown 在类中 AbstractQueueThread<E>public boolean isRun()
isRun 在类中 AbstractQueueThread<E>Copyright © 2023. All rights reserved.