@Test public void testIsEmpty() { assertTrue(nacosDelayTaskExecuteEngine.isEmpty()); nacosDelayTaskExecuteEngine.addTask("test", abstractTask); assertFalse(nacosDelayTaskExecuteEngine.isEmpty()); nacosDelayTaskExecuteEngine.removeTask("test"); assertTrue(nacosDelayTaskExecuteEngine.isEmpty()); }
@Override public void addTask(Object key, AbstractDelayTask newTask) { lock.lock(); try { AbstractDelayTask existTask = tasks.get(key); if (null != existTask) { newTask.merge(existTask); } tasks.put(key, newTask); } finally { lock.unlock(); } }
NacosDelayTaskExecuteEngine extends AbstractNacosTaskExecuteEngine<AbstractDelayTask> { @Override public void addTask(Object key, AbstractDelayTask newTask) { lock.lock(); try { AbstractDelayTask existTask = tasks.get(key); if (null != existTask) { newTask.merge(existTask); } tasks.put(key, newTask); } finally { lock.unlock(); } } }
NacosDelayTaskExecuteEngine extends AbstractNacosTaskExecuteEngine<AbstractDelayTask> { @Override public void addTask(Object key, AbstractDelayTask newTask) { lock.lock(); try { AbstractDelayTask existTask = tasks.get(key); if (null != existTask) { newTask.merge(existTask); } tasks.put(key, newTask); } finally { lock.unlock(); } } NacosDelayTaskExecuteEngine(String name);  NacosDelayTaskExecuteEngine(String name, Logger logger);  NacosDelayTaskExecuteEngine(String name, Logger logger, long processInterval);  NacosDelayTaskExecuteEngine(String name, int initCapacity, Logger logger);  NacosDelayTaskExecuteEngine(String name, int initCapacity, Logger logger, long processInterval); }
NacosDelayTaskExecuteEngine extends AbstractNacosTaskExecuteEngine<AbstractDelayTask> { @Override public void addTask(Object key, AbstractDelayTask newTask) { lock.lock(); try { AbstractDelayTask existTask = tasks.get(key); if (null != existTask) { newTask.merge(existTask); } tasks.put(key, newTask); } finally { lock.unlock(); } } NacosDelayTaskExecuteEngine(String name);  NacosDelayTaskExecuteEngine(String name, Logger logger);  NacosDelayTaskExecuteEngine(String name, Logger logger, long processInterval);  NacosDelayTaskExecuteEngine(String name, int initCapacity, Logger logger);  NacosDelayTaskExecuteEngine(String name, int initCapacity, Logger logger, long processInterval); @Override void addTask(Object key, AbstractDelayTask newTask); }
NacosDelayTaskExecuteEngine extends AbstractNacosTaskExecuteEngine<AbstractDelayTask> { @Override public void addTask(Object key, AbstractDelayTask newTask) { lock.lock(); try { AbstractDelayTask existTask = tasks.get(key); if (null != existTask) { newTask.merge(existTask); } tasks.put(key, newTask); } finally { lock.unlock(); } } NacosDelayTaskExecuteEngine(String name);  NacosDelayTaskExecuteEngine(String name, Logger logger);  NacosDelayTaskExecuteEngine(String name, Logger logger, long processInterval);  NacosDelayTaskExecuteEngine(String name, int initCapacity, Logger logger);  NacosDelayTaskExecuteEngine(String name, int initCapacity, Logger logger, long processInterval); @Override void addTask(Object key, AbstractDelayTask newTask);  }