ScheduleEngine

This commit is contained in:
redkale
2023-12-11 18:24:15 +08:00
parent 8780365e17
commit d6b9402ce0
9 changed files with 100 additions and 74 deletions

View File

@@ -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);

View File

@@ -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);