|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cruxframework.crux.core.server.rest.state.NoClusteredResourceStateHandler
public class NoClusteredResourceStateHandler
It is a very basic implementation for ResourceStateHandler interface that is designed to run only on NO CUSTERED environment. It uses a simple LRUMap to keep the resource state into local machine's memory. To configure the cache, you can create a file named NoClusteredCacheConfig.properties and configure the property maxNumberOfEntries to set the max number of entries into the map.
| Nested Class Summary | |
|---|---|
static class |
NoClusteredResourceStateHandler.CacheEntry
|
static class |
NoClusteredResourceStateHandler.LRUMap<K,V>
|
| Nested classes/interfaces inherited from interface org.cruxframework.crux.core.server.rest.state.ResourceStateHandler |
|---|
ResourceStateHandler.ResourceState |
| Constructor Summary | |
|---|---|
NoClusteredResourceStateHandler()
|
|
| Method Summary | |
|---|---|
ResourceStateHandler.ResourceState |
add(String uri,
long dateModified,
long expires,
String etag)
Add state information about one rest URI |
void |
clear()
Clear all state information from rest URIs |
ResourceStateHandler.ResourceState |
get(String uri)
Retrieve state information about one rest URI |
void |
remove(String uri)
Clear the state information about one rest URI |
void |
removeSegments(String... baseURIs)
Clear the state information about any rest URI that starts with one of the baseURIs provided |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NoClusteredResourceStateHandler()
| Method Detail |
|---|
public ResourceStateHandler.ResourceState add(String uri,
long dateModified,
long expires,
String etag)
ResourceStateHandler
add in interface ResourceStateHandlerpublic ResourceStateHandler.ResourceState get(String uri)
ResourceStateHandler
get in interface ResourceStateHandlerpublic void remove(String uri)
ResourceStateHandler
remove in interface ResourceStateHandlerpublic void clear()
ResourceStateHandler
clear in interface ResourceStateHandlerpublic void removeSegments(String... baseURIs)
ResourceStateHandler
removeSegments in interface ResourceStateHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||