@Override
    public int getCachedSize() throws CannotCalculateSizeException {

        // Please keep this ordered alphabetically for easier maintenance.

        int size = CacheSizes.sizeOfObject(); // object overhead.
        size += CacheSizes.sizeOfInt(); // accessModel
        size += CacheSizes.sizeOfCollection( affiliates );
        size += CacheSizes.sizeOfString( bodyXSLT );
        size += CacheSizes.sizeOfCollection( contacts );
        size += CacheSizes.sizeOfDate(); // creationDate
        size += CacheSizes.sizeOfAnything( creator );
        size += CacheSizes.sizeOfString( dataformXSLT );
        size += CacheSizes.sizeOfBoolean(); // deliverPayloads
        size += CacheSizes.sizeOfString( description );
        size += CacheSizes.sizeOfString( language );
        size += CacheSizes.sizeOfDate(); // modificationDate
        size += CacheSizes.sizeOfString( name );
        size += CacheSizes.sizeOfString( nodeID );
        size += CacheSizes.sizeOfBoolean(); // notifyConfigChanges
        size += CacheSizes.sizeOfBoolean(); // notifyDelete
        size += CacheSizes.sizeOfBoolean(); // notifyRetract
        size += CacheSizes.sizeOfObject(); // parent (reference, parent itself will already be in the cache).
        size += CacheSizes.sizeOfString( payloadType );
        size += CacheSizes.sizeOfBoolean(); // presenceBasedDelivery
        size += CacheSizes.sizeOfInt(); // publisherModel
        size += CacheSizes.sizeOfInt(); // replyPolicy
        size += CacheSizes.sizeOfCollection( replyRooms );
        size += CacheSizes.sizeOfCollection( replyTo );
        size += CacheSizes.sizeOfCollection( rosterGroupsAllowed );
        size += CacheSizes.sizeOfBoolean(); // savedToDB
        size += CacheSizes.sizeOfInt(); // service (reference, the instance is re-used by other nodes.
        size += CacheSizes.sizeOfBoolean(); // subscriptionConfigurationRequired
        size += CacheSizes.sizeOfBoolean(); // subscriptionEnabled
        size += 350 * subscriptionsByID.size(); // 350 bytes per entry is a guestimate.
        size += 350 * subscriptionsByJID.size(); // 350 bytes per entry is a guestimate.
        return size;
    }
A unique identifier for a node, in context of all services in the system.

The properties that uniquely identify a node are its service, and its nodeId.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/Node.java