From c05df578216314643838725e12c8e14446b2da9f Mon Sep 17 00:00:00 2001 From: awake Date: Tue, 22 Oct 2024 10:22:35 +0800 Subject: [PATCH] perf[orm]: code style --- orm/src/main/java/com/zfoo/orm/cache/EntityCache.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/orm/src/main/java/com/zfoo/orm/cache/EntityCache.java b/orm/src/main/java/com/zfoo/orm/cache/EntityCache.java index 72ecff7e..e04327ae 100644 --- a/orm/src/main/java/com/zfoo/orm/cache/EntityCache.java +++ b/orm/src/main/java/com/zfoo/orm/cache/EntityCache.java @@ -243,7 +243,6 @@ public class EntityCache, E extends IEntity> imple if (entityDef.isThreadSafe()) { EventBus.asyncExecute(clazz.hashCode(), () -> persistAllBlock()); } else { - var currentTime = TimeUtils.currentTimeMillis(); // key为threadId var updateMap = new HashMap>>(); var initSize = caches.size() >> 2; @@ -253,7 +252,6 @@ public class EntityCache, E extends IEntity> imple if (noNeedUpdate(pnode)) { return; } - pnode.resetTime(currentTime); var updateList = updateMap.computeIfAbsent(pnode.getThreadId(), it -> new ArrayList<>(initSize)); updateList.add(pnode); } @@ -275,7 +273,6 @@ public class EntityCache, E extends IEntity> imple @Override public void persistAllBlock() { - var currentTime = TimeUtils.currentTimeMillis(); var updateList = new ArrayList>(caches.size()); caches.forEach(new BiConsumer>() { @Override @@ -283,7 +280,6 @@ public class EntityCache, E extends IEntity> imple if (noNeedUpdate(pnode)) { return; } - pnode.resetTime(currentTime); updateList.add(pnode); } });