|
|||||||||
| Home >> All >> org >> [ hibernate overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.hibernate
Class CacheMode

java.lang.Objectorg.hibernate.CacheMode
- All Implemented Interfaces:
- java.io.Serializable
- public final class CacheMode
- extends java.lang.Object
- implements java.io.Serializable
- extends java.lang.Object
Controls how the session interacts with the second-level cache and query cache.
| Field Summary | |
static CacheMode |
GET
The session may read items from the cache, but will not add items, except to invalidate items when updates occur |
static CacheMode |
IGNORE
The session will never interact with the cache, except to invalidate cache items when updates occur |
private static java.util.Map |
INSTANCES
|
private boolean |
isGetEnabled
|
private boolean |
isPutEnabled
|
private java.lang.String |
name
|
static CacheMode |
NORMAL
The session may read items from the cache, and add items to the cache |
static CacheMode |
PUT
The session will never read items from the cache, but will add items to the cache as it reads them from the database. |
static CacheMode |
REFRESH
The session will never read items from the cache, but will add items to the cache as it reads them from the database. |
| Constructor Summary | |
private |
CacheMode(java.lang.String name,
boolean isPutEnabled,
boolean isGetEnabled)
|
| Method Summary | |
boolean |
isGetEnabled()
|
boolean |
isPutEnabled()
|
static CacheMode |
parse(java.lang.String name)
|
private java.lang.Object |
readResolve()
|
java.lang.String |
toString()
Convert this Object to a human-readable String. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
name
private final java.lang.String name
isPutEnabled
private final boolean isPutEnabled
isGetEnabled
private final boolean isGetEnabled
INSTANCES
private static final java.util.Map INSTANCES
NORMAL
public static final CacheMode NORMAL
- The session may read items from the cache, and add items to the cache
IGNORE
public static final CacheMode IGNORE
- The session will never interact with the cache, except to invalidate
cache items when updates occur
GET
public static final CacheMode GET
- The session may read items from the cache, but will not add items,
except to invalidate items when updates occur
PUT
public static final CacheMode PUT
- The session will never read items from the cache, but will add items
to the cache as it reads them from the database.
REFRESH
public static final CacheMode REFRESH
- The session will never read items from the cache, but will add items
to the cache as it reads them from the database. In this mode, the
effect of hibernate.cache.use_minimal_puts is bypassed, in
order to force a cache refresh
| Constructor Detail |
CacheMode
private CacheMode(java.lang.String name, boolean isPutEnabled, boolean isGetEnabled)
| Method Detail |
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object - Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null, string concatenation will instead use"null".The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode()).
isPutEnabled
public boolean isPutEnabled()
isGetEnabled
public boolean isGetEnabled()
readResolve
private java.lang.Object readResolve()
parse
public static CacheMode parse(java.lang.String name)
|
|||||||||
| Home >> All >> org >> [ hibernate overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.hibernate.CacheMode