List of usage examples for com.google.common.collect MapMaker MapMaker
public MapMaker()
From source file:com.alibaba.otter.node.etl.load.loader.LoadStatsTracker.java
public LoadStatsTracker() { throughputs = new MapMaker().makeComputingMap(new Function<Identity, LoadThroughput>() { public LoadThroughput apply(Identity identity) { return new LoadThroughput(identity); }//w w w . jav a 2 s.c om }); }
From source file:net.tomp2p.storage.ResponsibilityMemory.java
public ResponsibilityMemory() { responsibilityMap = new MapMaker().makeMap(); responsibilityMapRev = new MapMaker().makeMap(); }
From source file:com.tag.Cache.java
protected Map<K, V> createMap() { return new MapMaker().softValues().evictionListener(this).makeComputingMap(this); }
From source file:com.alibaba.otter.shared.common.utils.cache.ExtensionMemoryMirror.java
public ExtensionMemoryMirror(ComputeFunction<KEY, VALUE> function) { this.function = function; store = new MapMaker().makeMap(); }
From source file:de.cosmocode.palava.ipc.protocol.AbstractDetachedConnection.java
@Override protected ConcurrentMap<Object, Object> delegate() { if (context == null) { context = new MapMaker().makeMap(); }/*from w w w . j ava 2s .c om*/ return context; }
From source file:org.eclipse.milo.opcua.sdk.server.api.AbstractNodeManager.java
public AbstractNodeManager() { nodeMap = makeNodeMap(new MapMaker()); referenceMultimap = Multimaps.synchronizedListMultimap(ArrayListMultimap.create()); }
From source file:ru.aifgi.recognizer.model.ReadWriteLocker.java
private ReadWriteLocker() { myLocks = new MapMaker().concurrencyLevel(16).weakKeys().makeMap(); }
From source file:org.acz.mailsplat.MessageStore.java
@Inject public MessageStore(StoreConfig config, EventClient eventClient) { Preconditions.checkNotNull(config, "config must not be null"); Preconditions.checkNotNull(eventClient, "eventClient is null"); messages = new MapMaker().expireAfterWrite((long) config.getTtl().toMillis(), TimeUnit.MILLISECONDS) .makeMap();/*from w w w. j av a2 s . c o m*/ stats = new MessageStoreStats(eventClient); }
From source file:com.alibaba.otter.node.etl.common.jmx.StageAggregationCollector.java
public StageAggregationCollector(final int bufferSize) { collector = new MapMaker().makeComputingMap(new Function<Long, Map<StageType, StageAggregation>>() { public Map<StageType, StageAggregation> apply(Long input) { return new MapMaker().makeComputingMap(new Function<StageType, StageAggregation>() { public StageAggregation apply(StageType input) { return new StageAggregation(bufferSize); }// w ww. ja v a 2 s .co m }); } }); }
From source file:com.proofpoint.platform.sample.PersonStore.java
@Inject public PersonStore(StoreConfig config, EventClient eventClient) { Preconditions.checkNotNull(config, "config must not be null"); Preconditions.checkNotNull(eventClient, "eventClient is null"); persons = new MapMaker().expireAfterWrite((long) config.getTtl().toMillis(), TimeUnit.MILLISECONDS) .makeMap();//from w w w . j av a 2 s . co m stats = new PersonStoreStats(eventClient); }