@Override
    public int getCachedSize() throws CannotCalculateSizeException
    {
        int size = CacheSizes.sizeOfObject();
        size += CacheSizes.sizeOfAnything( jid );
        size += CacheSizes.sizeOfInt(); // affiliation
        size += CacheSizes.sizeOfInt(); // reference to node
        return size;
    }
Returns the approximate size of the Object in bytes. The size should be
considered to be a best estimate of how much memory the Object occupies
and may be based on empirical trials or dynamic calculations.<p>

@return the size of the Object in bytes.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/NodeAffiliate.java