mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-11 03:13:51 +00:00
ref[net]: move SingleCache to net module
This commit is contained in:
1 parent
529e81123b
commit
02272754f7
2 files changed
+8
-7
No files matched your search
+8
-1
@@ -11,10 +11,13 @@
|
||||
* See the License for the specific language governing permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package com.zfoo.scheduler.util;
|
||||
package com.zfoo.net.util;
|
||||
|
||||
import com.zfoo.event.manager.EventBus;
|
||||
import com.zfoo.scheduler.manager.SchedulerBus;
|
||||
import com.zfoo.scheduler.util.TimeUtils;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@@ -90,4 +93,8 @@ public class SingleCache<V> {
|
||||
EventBus.asyncExecute(this.hashCode(), () -> cache = supplier.get());
|
||||
}
|
||||
|
||||
public void lazyRefreshDelay(long delay, TimeUnit unit) {
|
||||
SchedulerBus.schedule(this::lazyRefresh, delay, unit);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -57,12 +57,6 @@
|
||||
<version>${zfoo.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.zfoo</groupId>
|
||||
<artifactId>event</artifactId>
|
||||
<version>${zfoo.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.javassist</groupId>
|
||||
<artifactId>javassist</artifactId>
|
||||
|
||||
Reference in new issue
Block a user