Top Description Fields Constructors Methods
jakarta.persistence

public final Enum CacheStoreMode

extends Enum<CacheStoreMode>
implements FindOption, RefreshOption
Class Inheritance
All Implemented Interfaces
jakarta.persistence.RefreshOption, jakarta.persistence.FindOption

Specifies how the EntityManager interacts with the second-level cache when data is read from the database and when data is written to the database.

Enumerates legal values of the property jakarta.persistence.cache.storeMode.

Since
2.0
See Also
EntityManager#setCacheStoreMode(CacheStoreMode), Query#setCacheStoreMode(CacheStoreMode)

Field Summary

Modifier and TypeField and Description
public static final CacheStoreMode
BYPASS

Don't insert into cache.

public static final CacheStoreMode
REFRESH

Insert/update entity data held in the cache when read from the database and when written to the database.

public static final CacheStoreMode
USE

Insert entity data into cache when read from database and insert/update entity data when written to the database: this is the default behavior.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static CacheStoreMode
public static CacheStoreMode[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

BYPASSback to summary
public static final CacheStoreMode BYPASS

Don't insert into cache.

REFRESHback to summary
public static final CacheStoreMode REFRESH

Insert/update entity data held in the cache when read from the database and when written to the database. Force refresh of cache for items read from database.

USEback to summary
public static final CacheStoreMode USE

Insert entity data into cache when read from database and insert/update entity data when written to the database: this is the default behavior. Does not force refresh of already cached items when reading from database.

Constructor Detail

CacheStoreModeback to summary
private CacheStoreMode()

Method Detail

valueOfback to summary
public static CacheStoreMode valueOf(String name)
valuesback to summary
public static CacheStoreMode[] values()