/** * Sets the maximum Cache size for the JID to nodeVer Cache * * @param maxCacheSize */ @SuppressWarnings("rawtypes") public static void setJidCapsMaxCacheSize(int maxCacheSize) { ((Cache) jidCaps).setMaxCacheSize(maxCacheSize); }
/** * Sets the maximum Cache size for the nodeVer to DiscoverInfo Cache * * @param maxCacheSize */ @SuppressWarnings("rawtypes") public static void setCapsMaxCacheSize(int maxCacheSize) { ((Cache) caps).setMaxCacheSize(maxCacheSize); }
/** * Create a MemoryAvatarCache. * * @param maxSize the maximum number of objects the cache will hold. -1 means the cache has no max size. * @param maxlifetime the maximum amount of time (in ms) objects can exist in cache before being deleted. * -1 means objects never expire. */ public MemoryAvatarCache(final int maxSize, final long maxlifetime) { mCache = new Cache<String, byte[]>(maxSize, maxlifetime); }