SpringBoot示例代码
@Test
public void testDelayQueue()throws Exception{
JSONArray jsonArray = new JSONArray();
jsonArray.add("1aa");
jsonArray.add("2ab");
// TaskBase taskBase = new TaskBase(String.valueOf(System.currentTimeMillis()), jsonArray.toJavaList(String.class));
TaskBase taskBase = new TaskBase(String.valueOf(System.currentTimeMillis()), jsonArray);
DelayTask delayTask = new DelayTask(taskBase, 10*1000);
delayQueueManager.put(delayTask);
Thread.sleep(15*1000);
}