class SocketIoMemoryAdapter extends SocketIoAdapter {

    @Override
    public synchronized void add(String room, SocketIoSocket socket) throws IllegalArgumentException {
        if (room == null) {
            throw new IllegalArgumentException("room must not be null.");
        }
        if (socket == null) {
            throw new IllegalArgumentException("socket must not be null.");
        }

        if (!mSocketRooms.containsKey(socket.getId())) {
            mSocketRooms.put(socket.getId(), new HashSet<>());
        }
        if (!mRoomSockets.containsKey(room)) {
            mRoomSockets.put(room, new HashSet<>());
        }

        mSocketRooms.get(socket.getId()).add(room);
        mRoomSockets.get(room).add(socket);
    }

    private  SocketIoMemoryAdapter(SocketIoNamespace namespace);

}