public class ConcurrentBusExecutor extends Object implements java.util.function.BiConsumer<Long,ITask>
| 限定符和类型 | 类和说明 |
|---|---|
static class |
ConcurrentBusExecutor.TaskState |
class |
ConcurrentBusExecutor.TaskWrapper |
| 构造器和说明 |
|---|
ConcurrentBusExecutor(int nThread) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
accept(Long busKey,
ITask task) |
Collection<ConcurrentBusExecutor.TaskWrapper> |
getTasks(Long busId) |
long |
size() |
Recently<ConcurrentBusExecutor.TaskWrapper> |
taskHis() |
Map<Long,Integer> |
toMap() |
Recently<ConcurrentBusExecutor.TaskWrapper> |
tooLongTimeTaskHis() |
String |
toString() |
long |
total() |
Map<Long,Collection<ConcurrentBusExecutor.TaskWrapper>> |
toTaskMap() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitandThenprotected final Thread[] threads
public void accept(Long busKey, ITask task)
accept 在接口中 java.util.function.BiConsumer<Long,ITask>busKey - 保证相同busKey任何一个时刻都只有1个线程在处理,以便规避数据库死锁。task - 任务public long size()
public long total()
public Map<Long,Collection<ConcurrentBusExecutor.TaskWrapper>> toTaskMap()
public Collection<ConcurrentBusExecutor.TaskWrapper> getTasks(Long busId)
public Recently<ConcurrentBusExecutor.TaskWrapper> tooLongTimeTaskHis()
public Recently<ConcurrentBusExecutor.TaskWrapper> taskHis()
Copyright © 2022. All rights reserved.