|
GigaSpaces XAP 10.0.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openspaces.core.map.LocalCacheSupport
public class LocalCacheSupport
A bean holding local cache support (when using Map API) configuration.
Field Summary | |
---|---|
static String |
LOCAL_CACHE_UPDATE_MODE_PULL
|
static String |
LOCAL_CACHE_UPDATE_MODE_PUSH
|
Constructor Summary | |
---|---|
LocalCacheSupport()
|
Method Summary | |
---|---|
EvictionStrategy |
getEvictionStrategy()
Sets the eviction strategy for the local cache. |
int |
getLocalCacheUpdateMode()
If set to SpaceURL.UPDATE_MODE_PULL (1 ) each update triggers an
invalidation event at every cache instance. |
int |
getSizeLimit()
Sets the size limit of the local cache. |
boolean |
isPutFirst()
When performing a put operation, you may perform the put operation both into the local cache and the master space. |
boolean |
isVersioned()
Controls if this local cache will be versioned or not. |
void |
setEvictionStrategy(EvictionStrategy evictionStrategy)
Sets the eviction strategy for the local cache. |
void |
setPutFirst(boolean putFirst)
When performing a put operation, you may perform the put operation both into the local cache and the master space. |
void |
setSizeLimit(int sizeLimit)
Sets the size limit of the local cache. |
void |
setUpdateMode(int localCacheUpdateMode)
If set to SpaceURL.UPDATE_MODE_PULL (1 ) each update triggers an
invalidation event at every cache instance. |
void |
setUpdateModeName(String localCacheUpdateModeName)
Allows to set the local cache update mode using a descriptive name instead of integer constants using localCacheUpdateMode . |
void |
setVersioned(boolean versioned)
Controls if this local cache will be versioned or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String LOCAL_CACHE_UPDATE_MODE_PUSH
public static final String LOCAL_CACHE_UPDATE_MODE_PULL
Constructor Detail |
---|
public LocalCacheSupport()
Method Detail |
---|
public void setVersioned(boolean versioned)
true
, make sure that the actual space is versioned as well.
public boolean isVersioned()
true
, make sure that the actual space is versioned as well.
public void setEvictionStrategy(EvictionStrategy evictionStrategy)
public EvictionStrategy getEvictionStrategy()
public void setUpdateMode(int localCacheUpdateMode)
SpaceURL.UPDATE_MODE_PULL
(1
) each update triggers an
invalidation event at every cache instance. The invalidate event marks the object in the
local cache instances as invalid. Therefore, an attempt to read this object triggers a reload
process in the master space. This configuration is useful in cases where objects are updated
frequently, but the updated value is required by the application less frequently.
If set to SpaceURL.UPDATE_MODE_PUSH
(2
) the master pushes the
updates to the local cache, which holds a reference to the same updated object.
setUpdateModeName(String)
public int getLocalCacheUpdateMode()
SpaceURL.UPDATE_MODE_PULL
(1
) each update triggers an
invalidation event at every cache instance. The invalidate event marks the object in the
local cache instances as invalid. Therefore, an attempt to read this object triggers a reload
process in the master space. This configuration is useful in cases where objects are updated
frequently, but the updated value is required by the application less frequently.
If set to SpaceURL.UPDATE_MODE_PUSH
(2
) the master pushes the
updates to the local cache, which holds a reference to the same updated object.
setUpdateMode(int)
public void setUpdateModeName(String localCacheUpdateModeName)
localCacheUpdateMode
. Accepts either
push
or pull
.
(int)
public void setPutFirst(boolean putFirst)
true
.
public boolean isPutFirst()
true
.
public void setSizeLimit(int sizeLimit)
100000
.
public int getSizeLimit()
100000
.
|
GigaSpaces XAP 10.0.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |