@Override
    public boolean hasClientRoute(JID jid) {
        if (jid.getNode() == null || jid.getResource() == null) {
            Log.trace("hasClientRoute() invoked with a JID that's not a full JID: {}", jid);
            return false;
        }
        final Lock lock = usersSessionsCache.getLock(jid.toBareJID());
        lock.lock();
        try {
            return usersCache.containsKey(jid.toFullJID());
        } finally {
            lock.unlock();
        }
    }
Gets the non-negative session from a minimal priority.

@param sessions The sessions.
@param min      The minimal priority.
@return The filtered sessions.
xmppserver/src/main/java/org/jivesoftware/openfire/spi/RoutingTableImpl.java