public abstract class CachedIndexFactory extends Object implements IndexFactory
Subtypes define how the object for a given index is obtained, and hence the mapping of indexes to objects used in the caller.
The name is a touch misleading - the objects returned are not (necessarily) indexes.
null object references can be cached and returned.
Individual elements can be removed from the cache or all elements may be removed.
| Constructor and Description |
|---|
CachedIndexFactory() |
| Modifier and Type | Method and Description |
|---|---|
Object |
get(int index)
Get either from cache or, failing that, really get it.
|
void |
invalidate()
Invalidate whole cache.
|
void |
invalidate(int index)
Invalidate an entry in the cache.
|
public Object get(int index)
get in interface IndexFactoryindex - the indexIndexFactory.get(int)public void invalidate(int index)
index - the entry's index to invalidatepublic void invalidate()
Copyright © 2000–2021 PanEris. All rights reserved.