public abstract class StoreStrategyAbstract extends Object implements StoreStrategy
| Modifier and Type | Field and Description |
|---|---|
protected static int |
AWAIT |
protected static BlockingQueue<GIOMessage> |
messageBlockingQueue |
protected static int |
PUSH_THREAD_POOL_TIMEOUT |
protected static ExecutorService |
pushMsgThreadPool |
protected static int |
SEND_THREAD_POOL_TIMEOUT |
protected static int |
SENDER_THREAD_POOL_TIMEOUT |
| Constructor and Description |
|---|
StoreStrategyAbstract() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
doPush(GIOMessage msg) |
void |
push(GIOMessage msg) |
void |
registerShutdownHook()
最后在调用此方法,以避免关闭时,queue没有被消费完.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitawaitTerminationAfterShutdown, shutDownNowprotected static ExecutorService pushMsgThreadPool
protected static final int AWAIT
protected static final int PUSH_THREAD_POOL_TIMEOUT
protected static final int SEND_THREAD_POOL_TIMEOUT
protected static final int SENDER_THREAD_POOL_TIMEOUT
protected static BlockingQueue<GIOMessage> messageBlockingQueue
public void push(GIOMessage msg)
push in interface StoreStrategypublic abstract void doPush(GIOMessage msg)
public void registerShutdownHook()
registerShutdownHook in interface StoreStrategyCopyright © 2022. All rights reserved.