ScheduleEngine
This commit is contained in:
@@ -6,8 +6,7 @@ package org.redkale.test.caching;
|
||||
import java.time.Duration;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.redkale.caching.CacheConfig;
|
||||
import org.redkale.caching.CacheManagerService;
|
||||
import org.redkale.caching.CacheEngine;
|
||||
import org.redkale.convert.json.JsonConvert;
|
||||
import org.redkale.source.CacheMemorySource;
|
||||
import org.redkale.util.Utility;
|
||||
@@ -27,7 +26,7 @@ public class CachingTest {
|
||||
public void run() throws Exception {
|
||||
CacheMemorySource remoteSource = new CacheMemorySource("remote");
|
||||
remoteSource.init(null);
|
||||
CacheManagerService cache = CacheManagerService.create(new CacheConfig(), remoteSource);
|
||||
CacheEngine cache = CacheEngine.create(remoteSource);
|
||||
cache.init(null);
|
||||
Duration expire = Duration.ofMillis(490);
|
||||
cache.localSetString("user", "name:haha", "myha", expire);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package org.redkale.test.scheduling;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.redkale.scheduling.ScheduleFactory;
|
||||
import org.redkale.scheduling.ScheduleEngine;
|
||||
import org.redkale.util.Utility;
|
||||
|
||||
/**
|
||||
@@ -20,7 +20,7 @@ public class ScheduleTest {
|
||||
|
||||
@Test
|
||||
public void run() throws Exception {
|
||||
ScheduleFactory factory = ScheduleFactory.create(null);
|
||||
ScheduleEngine factory = ScheduleEngine.create(null);
|
||||
ScheduleService service = new ScheduleService();
|
||||
factory.schedule(service);
|
||||
Utility.sleep(3000);
|
||||
|
||||
Reference in New Issue
Block a user