| java.lang.Object com.mvnforum.db.RankCache
RankCache | final public class RankCache (Code) | | |
Method Summary | |
public synchronized RankBean | getBean(int rankID) | public synchronized ArrayList | getBeans() IMPORTANT NOTE: The caller must not alter the returned collection
Note: since the return value can be accessed in many threads,
we must be sure that this collection is intact. | public static RankCache | getInstance() | public synchronized void | reload() Reload to get the latest info
Normally, this class will detect all the modifications in the table. |
getBeans | public synchronized ArrayList getBeans() throws DatabaseException(Code) | | IMPORTANT NOTE: The caller must not alter the returned collection
Note: since the return value can be accessed in many threads,
we must be sure that this collection is intact. Now we can only
be sure that each object in the collection is intact (default set methods),
but we can not prevent the collection from being changed
#@todo Find a way to make the collection immutable
|
getInstance | public static RankCache getInstance()(Code) | | Returns the single instance
RankCache : the singleton instance.NOTE: if use normal singleton pattern, this method should be synchronized |
reload | public synchronized void reload() throws DatabaseException(Code) | | Reload to get the latest info
Normally, this class will detect all the modifications in the table.
However, call this method to force a reload
Auto call reload after some time (say 1 hour) is also a good idea
|
|
|