private synchronized void createElement(long userId) {

        // do another test just in case another thread beat us to the lock
        UidBaseElement uide = allElements.get(userId);
        if (uide == null) {
            uide = new UidBaseElement(userId);
            allElements.put(userId, uide);
        }
        else { // somebody beat the lock and created one so increment the counters
            uide.occurence();
        }
    }