This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # MongoDB Dockerfile | |
| # | |
| # https://github.com/dockerfile/mongodb | |
| # | |
| # Pull base image. | |
| FROM ubuntu:14.04 | |
| # Install MongoDB. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static void testRefresh() throws ExecutionException, InterruptedException { | |
| LogTime logTime = new LogTime(); | |
| AtomicInteger value = new AtomicInteger(); | |
| LoadingCache<String, String> cb = CacheBuilder.newBuilder() | |
| .maximumSize(1000) | |
| .refreshAfterWrite(6, TimeUnit.SECONDS) | |
| .removalListener((RemovalListener<String, String>) notification -> { | |
| logTime.log("remove key : " + notification.getKey() + ", value : " + notification.getValue() + ", cause " + notification.getCause()); | |
| }) | |
| .build(new CacheLoader<String, String>() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.lavector.concurrency; | |
| import java.util.concurrent.*; | |
| /** | |
| * @author seveniu | |
| * @date 2017-01-09 | |
| * @Description | |
| */ | |
| public class BoundedExecutor { |
OlderNewer