com.browseengine.bobo.util
Class MemoryManager<T>
java.lang.Object
com.browseengine.bobo.util.MemoryManager<T>
- All Implemented Interfaces:
- MemoryManagerAdminMBean
public class MemoryManager<T>
- extends Object
- implements MemoryManagerAdminMBean
- Author:
- "Xiaoyang Gu"
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MemoryManager
public MemoryManager(MemoryManager.Initializer<T> initializer)
getAdminMBean
public MemoryManagerAdminMBean getAdminMBean()
getNumCacheMisses
public long getNumCacheMisses()
- Specified by:
getNumCacheMisses in interface MemoryManagerAdminMBean
getNumCacheHits
public long getNumCacheHits()
- Specified by:
getNumCacheHits in interface MemoryManagerAdminMBean
getHitRate
public double getHitRate()
- Specified by:
getHitRate in interface MemoryManagerAdminMBean
get
public T get(int reqsize)
- Returns:
- an initialized instance of type T. The size of the instance may not be the same as the requested size.
release
public void release(T buf)
- return the instance to the manager after use
- Parameters:
buf -
Copyright © 2011. All Rights Reserved.