List of usage examples for java.util.concurrent ConcurrentSkipListMap ConcurrentSkipListMap
public ConcurrentSkipListMap()
From source file:Main.java
public static <K, V> ConcurrentSkipListMap<K, V> createConcurrentSkipListMap() { return new ConcurrentSkipListMap<K, V>(); }
From source file:Main.java
public static <K, V> ConcurrentSkipListMap<K, V> createConcurrentSkipListMap(Comparator<? super K> comparator) { if (comparator == null) { return new ConcurrentSkipListMap<K, V>(); }//from w w w. ja v a2s .c o m return new ConcurrentSkipListMap<K, V>(comparator); }
From source file:Main.java
public static <K, V> ConcurrentSkipListMap<K, V> createConcurrentSkipListMap( Map<? extends K, ? extends V> map) { if (map == null) { return new ConcurrentSkipListMap<K, V>(); }// w w w.j av a 2 s . c o m return new ConcurrentSkipListMap<K, V>(map); }
From source file:Main.java
public static <K, V> ConcurrentSkipListMap<K, V> newConcurrentSkipListMap() { return new ConcurrentSkipListMap<K, V>(); }
From source file:Main.java
public static <K, V> ConcurrentSkipListMap<K, V> createConcurrentSkipListMap( SortedMap<? extends K, ? extends V> map) { if (map == null) { return new ConcurrentSkipListMap<K, V>(); }/* w w w. jav a2 s . co m*/ return new ConcurrentSkipListMap<K, V>(map); }
From source file:Main.java
/** * Returns a newly created Map object./*w w w . j av a2 s .c om*/ * * @param sorted Whether the Map should maintain keys sorted in natural ascending order. * @param <K> The class of Map keys. * @param <V> The class of Map values. * @return A newly created Map object. */ public static <K, V> ConcurrentMap<K, V> create(boolean sorted) { ConcurrentMap<K, V> map; if (sorted) { map = new ConcurrentSkipListMap<K, V>(); } else { map = new ConcurrentHashMap<K, V>(); } return map; }
From source file:com.c77.androidstreamingclient.lib.rtp.Frame.java
/** * Create a frame from a getPacket// ww w .ja v a 2 s. c o m * * @param packet */ public Frame(DataPacketWithNalType packet) { packets = new ConcurrentSkipListMap<Integer, DataPacketWithNalType>(); timestamp = packet.getTimestamp(); packets.put(new Integer(packet.getSequenceNumber()), packet); }
From source file:lockstep.ServerReceivingQueue.java
/** * Constructor./*from w w w .j a va 2 s .co m*/ * * @param initialFrameNumber First frame's number. Must be the same for all * the hosts using the protocol * * @param senderID ID of the client whose frames are collected in this queue * * @param serverExecutionSemaphore semaphore used by to signal the client of * the availability of the next frame input. The client awaits that all the * queues are ready before collecting the next frame inputs */ public ServerReceivingQueue(int initialFrameNumber, int senderID, Semaphore serverExecutionSemaphore) { this.senderID = senderID; this.commandBuffer = new ConcurrentSkipListMap<>(); this.executionSemaphore = serverExecutionSemaphore; this.lastInOrderACK = new AtomicInteger(initialFrameNumber - 1); this.selectiveACKsSet = new ConcurrentSkipListSet<>(); }
From source file:lockstep.ClientReceivingQueue.java
/** * Constructor.// ww w . j ava 2s .c om * * @param initialFrameNumber First frame's number. Must be the same for all * the hosts using the protocol * * @param senderID ID of the client whose frames are collected in this queue * * @param clientExecutionSemaphore semaphore used by to signal the client of * the availability of the next frame input. The client awaits that all the * queues are ready before collecting the next frame inputs */ public ClientReceivingQueue(int initialFrameNumber, int senderID, Semaphore clientExecutionSemaphore) { this.senderID = senderID; this.nextFrame = new AtomicInteger(initialFrameNumber); this.commandBuffer = new ConcurrentSkipListMap<>(); this.executionSemaphore = clientExecutionSemaphore; this.lastInOrderACK = new AtomicInteger(initialFrameNumber - 1); this.selectiveACKsSet = new ConcurrentSkipListSet<>(); }
From source file:org.janusgraph.diskstorage.keycolumnvalue.inmemory.InMemoryKeyColumnValueStore.java
public InMemoryKeyColumnValueStore(final String name) { Preconditions.checkArgument(StringUtils.isNotBlank(name)); this.name = name; this.kcv = new ConcurrentSkipListMap<StaticBuffer, ColumnValueStore>(); }