@Override
    public void loadNode( PubSubService service, Node.UniqueIdentifier nodeIdentifier )
    {
        log.debug( "Loading node: {}", nodeIdentifier );

        final Lock lock = serviceIdToNodesCache.getLock( service.getUniqueIdentifier() );
        lock.lock();
        try {
            final Set<Node> nodes = serviceIdToNodesCache.get(service.getUniqueIdentifier());
            if ( nodes != null )
            {
                final Optional<Node> optionalNode = nodes.stream().filter(node -> node.getUniqueIdentifier().equals(nodeIdentifier)).findAny();
                optionalNode.ifPresent(service::addNode);
            }
        } finally {
            lock.unlock();
        }
    }
Cache that holds all published items (mapped by node ID).
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/InMemoryPubSubPersistenceProvider.java