org.hibernate
Class CacheMode

java.lang.Object
  extended byorg.hibernate.CacheMode
All Implemented Interfaces:
Serializable

public final class CacheMode
extends Object
implements Serializable

Controls how the session interacts with the second-level cache and query cache.

Author:
Gavin King
See Also:
Session.setCacheMode(CacheMode), Serialized Form

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
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.
 
Method Summary
 boolean isGetEnabled()
           
 boolean isPutEnabled()
           
static CacheMode parse(String name)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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

Method Detail

toString

public String toString()

isPutEnabled

public boolean isPutEnabled()

isGetEnabled

public boolean isGetEnabled()

parse

public static CacheMode parse(String name)