@Override
    public int getCachedSize()
            throws CannotCalculateSizeException {
        // Approximate the size of the object in bytes by calculating the size
        // of each field.
        int size = 0;
        size += CacheSizes.sizeOfObject();              // overhead of object
        size += CacheSizes.sizeOfLong();                // id
        size += CacheSizes.sizeOfString(username);      // username
        size += CacheSizes.sizeOfString(name);          // name
        size += CacheSizes.sizeOfString(email);         // email
        size += CacheSizes.sizeOfDate() * 2;            // creationDate and modificationDate
        size += CacheSizes.sizeOfMap(properties);       // properties
        return size;
    }
Returns the user's roster. A roster is a list of users that the user wishes to know
if they are online. Rosters are similar to buddy groups in popular IM clients.

@return the user's roster.
xmppserver/src/main/java/org/jivesoftware/openfire/user/User.java