Code example for MapMaker

    protected Long                     timeout = 60 * 1000L; // 对应的超时时间,1分钟
    protected Map<RpcPipeKey, DbBatch> cache;
    public void afterPropertiesSet() throws Exception {
        cache = new MapMaker().expireAfterWrite(timeout, TimeUnit.MILLISECONDS).softValues().makeMap();
    // rpc get操作事件 
    public static class RpcEvent extends Event { 
        private static final long serialVersionUID = 810191575813164952L;
        public RpcEvent(EventType eventType){
        public RpcPipeKey key;
        public RpcPipeKey getKey() { 
Connect your IDE to all the code out there  Get Codota for Java