public class LevelDBContainer extends QueueEventContainer
| 限定符和类型 | 字段和说明 |
|---|---|
protected float |
blockingQueueFactor
it would calculate blocking queue capacity by maximumPoolSize * factory
|
protected int |
blockingQueueSize |
protected ArrayBlockingQueue<Runnable> |
bockingQueue |
protected int |
corePoolSize |
protected AtomicLong |
counter |
protected int |
keepAliveTime |
protected eventcenter.leveldb.LevelDBContainer.ListenQueueThread |
listenQueueThread |
protected Object |
locker |
protected long |
loopQueueInterval
遍历循环队列中的元素间隔时间,单位毫秒
|
protected int |
maximumPoolSize |
protected ThreadPoolExecutor |
threadPool |
protected TransactionConfig |
transactionConfig
容器可事务化配置,如果需要容器支持
|
config, listenerCache, logger, queue| 构造器和说明 |
|---|
LevelDBContainer(EventCenterConfig config,
EventQueue queue) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
commitTransaction(EventTxnStatus txn) |
int |
countOfLiveThread() |
int |
countOfMaxConcurrent() |
int |
countOfQueueBuffer() |
protected ThreadPoolExecutor |
createThreadPool() |
protected EventListener |
findAsyncEventListeners(CommonEventSource message,
Class<? extends EventListener> type) |
float |
getBlockingQueueFactor() |
int |
getCorePoolSize() |
int |
getKeepAliveTime() |
long |
getLoopQueueInterval() |
int |
getMaximumPoolSize() |
TransactionConfig |
getTransactionConfig()
容器可事务化配置,如果需要容器支持
|
boolean |
isIdle() |
boolean |
isPersisted()
这个容器会将事件缓存在leveldb文件数据库中,所以他是支持持久化的容器
|
void |
setBlockingQueueFactor(float blockingQueueFactor) |
void |
setCorePoolSize(int corePoolSize) |
void |
setKeepAliveTime(int keepAliveTime) |
void |
setLoopQueueInterval(long loopQueueInterval) |
void |
setMaximumPoolSize(int maximumPoolSize) |
void |
setTransactionConfig(TransactionConfig transactionConfig)
容器可事务化配置,如果需要容器支持
|
void |
shutdown() |
void |
startup() |
findAsyncEventListeners, getEventRegister, getQueue, queueSize, sendprotected ThreadPoolExecutor threadPool
protected eventcenter.leveldb.LevelDBContainer.ListenQueueThread listenQueueThread
protected int corePoolSize
protected int maximumPoolSize
protected int keepAliveTime
protected final Object locker
protected ArrayBlockingQueue<Runnable> bockingQueue
protected float blockingQueueFactor
protected int blockingQueueSize
protected long loopQueueInterval
protected TransactionConfig transactionConfig
protected final AtomicLong counter
public LevelDBContainer(EventCenterConfig config, EventQueue queue)
protected ThreadPoolExecutor createThreadPool()
public int getCorePoolSize()
public void setCorePoolSize(int corePoolSize)
public int getMaximumPoolSize()
public void setMaximumPoolSize(int maximumPoolSize)
public int getKeepAliveTime()
public void setKeepAliveTime(int keepAliveTime)
public float getBlockingQueueFactor()
public void setBlockingQueueFactor(float blockingQueueFactor)
public long getLoopQueueInterval()
public void setLoopQueueInterval(long loopQueueInterval)
public TransactionConfig getTransactionConfig()
public void setTransactionConfig(TransactionConfig transactionConfig)
transactionConfig - public void startup()
throws Exception
startup 在类中 QueueEventContainerExceptionpublic void shutdown()
throws Exception
shutdown 在类中 QueueEventContainerExceptionpublic boolean isPersisted()
public boolean isIdle()
isIdle 在类中 QueueEventContainerpublic void commitTransaction(EventTxnStatus txn)
protected EventListener findAsyncEventListeners(CommonEventSource message, Class<? extends EventListener> type)
public int countOfMaxConcurrent()
public int countOfLiveThread()
public int countOfQueueBuffer()
Copyright © 2018 Jue Ming. All rights reserved.