|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.activemath.presentation.FragmentCache
public class FragmentCache
Store the translation to the various assembly formats of the fetched fragments. Fragments of the same Item are stored in the same cache group so they can be removed together. This cache also listens for removals from the Item cache, so that corresponding fragments are removed as well.
| Field Summary | |
|---|---|
static String |
CACHE_ID
|
protected static Category |
log
|
| Constructor Summary | |
|---|---|
FragmentCache()
|
|
| Method Summary | |
|---|---|
void |
clear()
|
void |
cleared()
Listening to ItemCache |
void |
cleared(Serializable id)
Listening to ItemCache |
Fragment |
get(String id,
String format,
String lang)
Look for fragment in cache. |
CacheInfo |
getCacheInfo()
|
static FragmentCache |
getInstance()
|
void |
notStored(Serializable arg0,
Serializable arg1,
Long arg2,
Long arg3,
Serializable arg4)
|
static boolean |
put(Fragment fragment)
Store fragment in cache. |
void |
remove(String mbaseId)
Remove all fragments belonging to a content Item. |
void |
stored(Serializable arg0,
Serializable arg1,
Long arg2,
Long arg3,
Serializable arg4)
|
void |
storeRequested(Serializable arg0,
Serializable arg1,
Long arg2,
Long arg3,
Serializable arg4)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static Category log
public static final String CACHE_ID
| Constructor Detail |
|---|
public FragmentCache()
| Method Detail |
|---|
public static FragmentCache getInstance()
public Fragment get(String id,
String format,
String lang)
id - absolute identifier of the fragment.format - output format.lang - language tag, which can contain extended fields like "en_UK".
null otherwise.public static boolean put(Fragment fragment)
public void remove(String mbaseId)
remove in interface CacheControlCacheControl.remove(java.lang.String)public void clear()
clear in interface CacheControlCacheControl.clear()public CacheInfo getCacheInfo()
getCacheInfo in interface CacheControlCacheControl.getCacheInfo()public void cleared()
cleared in interface StorageListenerStorageListener.cleared()public void cleared(Serializable id)
cleared in interface StorageListenerStorageListener.cleared(java.io.Serializable)
public void notStored(Serializable arg0,
Serializable arg1,
Long arg2,
Long arg3,
Serializable arg4)
notStored in interface StorageListenerStorageListener.notStored(java.io.Serializable, java.io.Serializable, java.lang.Long, java.lang.Long, java.io.Serializable)
public void stored(Serializable arg0,
Serializable arg1,
Long arg2,
Long arg3,
Serializable arg4)
stored in interface StorageListenerStorageListener.stored(java.io.Serializable, java.io.Serializable, java.lang.Long, java.lang.Long, java.io.Serializable)
public void storeRequested(Serializable arg0,
Serializable arg1,
Long arg2,
Long arg3,
Serializable arg4)
storeRequested in interface StorageListenerStorageListener.storeRequested(java.io.Serializable, java.io.Serializable, java.lang.Long, java.lang.Long, java.io.Serializable)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||