Example usage for com.google.common.collect Maps synchronizedNavigableMap

List of usage examples for com.google.common.collect Maps synchronizedNavigableMap

Introduction

In this page you can find the example usage for com.google.common.collect Maps synchronizedNavigableMap.

Prototype

@GwtIncompatible("NavigableMap")
public static <K, V> NavigableMap<K, V> synchronizedNavigableMap(NavigableMap<K, V> navigableMap) 

Source Link

Document

Returns a synchronized (thread-safe) navigable map backed by the specified navigable map.

Usage

From source file:strat.mining.stratum.proxy.manager.LogManager.java

public LogManager() {
    // initialize the instance variable here since log4j will instantiate
    // this manager (even if constructor is private)
    instance = this;
    logEntries = Maps.synchronizedNavigableMap(new TreeMap<Long, String>());
    appenderThread = new LogAppenderThread();
    appenderThread.setName("LogAppenderThread");
    appenderThread.start();/*from   w  ww  . ja v  a2 s  . c o m*/
}