@Override
    public int getCachedSize() throws CannotCalculateSizeException {
        // Approximate the size of the object in bytes by calculating the size
        // of the content of each field, if that content is likely to be eligable for
        // garbage collection if the Roster instance is dereferenced.
        int size = 0;
        size += CacheSizes.sizeOfObject();                           // overhead of object
        size += CacheSizes.sizeOfCollection(rosterItems.values());   // roster item cache
        size += CacheSizes.sizeOfString(username);                   // username

        // implicitFrom
        for (Map.Entry<String, Set<String>> entry : implicitFrom.entrySet()) {
            size += CacheSizes.sizeOfString(entry.getKey());
            size += CacheSizes.sizeOfCollection(entry.getValue());
        }

        return size;
    }
Sends a presence probe to the probee for each connected resource of this user.
xmppserver/src/main/java/org/jivesoftware/openfire/roster/Roster.java