Package java.util.concurrent

Examples of java.util.concurrent.ConcurrentSkipListSet


    private Collection<LobbySession> getPlayers(int gameTypeId) {
        // add to new list
        Collection<LobbySession> players = gameTypeRooms.get(gameTypeId);
        if (players==null) {
            // we need to use something Concurrent or we will get ConcurrentModificationException
            gameTypeRooms.putIfAbsent(gameTypeId, new ConcurrentSkipListSet() );
            players = gameTypeRooms.get(gameTypeId);
        }
        return players;
    }
View Full Code Here

TOP

Related Classes of java.util.concurrent.ConcurrentSkipListSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.