About CacheStoreMode

1-10 of 11Refresh
Manual
137

Shared (L2) Entity Cache

, which are defined as constants of the CacheStoreMode enum: CacheStoreMode.BYPASS - cache is not updated with new data. CacheStoreMode.USE - new data in stored in the cache - but only for entity objects that are not in the cache already. CacheStoreMode.REFRESH - new data is stored in the cache - refreshing entity
JPA Doc
100

javax.persistence.CacheStoreMode

javax.persistence Enum CacheStoreMode java.lang.Object java.lang.EnumCacheStoreMode> javax.persistence.CacheStoreMode Implemented Interfaces: Serializable, Comparable<CacheStoreMode> Used as the value of the javax.persistence.cache.storeMode property to specify
JPA Doc
87

values()

Static Method javax.persistence.CacheStoreMode CacheStoreMode[] values() Returns an array containing the constants of this enum type. This method may be used to iterate over the constants as follows: for (CacheStoreMode c : CacheStoreMode.values()) System.out.println(c) Returns: an array
JPA Doc
84

JPA Miscellaneous

This section contains miscellaneous JPA types. The PersistenceUtil and PersistenceUnitUtil interfaces provide general utility methods: The Cache interface and the CacheRetrieveMode and CacheStoreMode enum types serve in managing the EntityManagerFactory's shared (level 2) cache: Other enum types are provided for setting of various JPA operations:
JPA Doc
82

valueOf(name)

Static Method javax.persistence.CacheStoreMode CacheStoreMode valueOf(   String name ) Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. Parameters: name - the name of the enum constant
JPA Doc
79

CacheStoreMode.BYPASS

Enum Constant javax.persistence.CacheStoreMode BYPASS Don't insert into cache. Since: JPA 2.0
JPA Doc
79

CacheStoreMode.REFRESH

Enum Constant javax.persistence.CacheStoreMode REFRESH Insert/update entity data into cache when read from database and when committed into database. Forces refresh of cache for items read from database. Since: JPA 2.0
JPA Doc
79

CacheStoreMode.USE

Enum Constant javax.persistence.CacheStoreMode USE Insert/update entity data into cache when read from database and when committed into database: this is the default behavior. Does not force refresh of already cached items when reading from database. Since: JPA 2.0
Result
8

java.lang.Comparable

java.lang Interface Comparable Implementing Classes: AccessType, PersistentAttributeType, BindableType, ByteIdentity, CacheRetrieveMode, CacheStoreMode, CascadeType, CharIdentity, Trimspec, DiscriminatorStrategy, DiscriminatorType, Enum, EnumType, FetchType, FlushModeType, ForeignKeyAction
Result
8

java.io.Serializable

java.io Interface Serializable Subinterfaces: PersistenceManagerFactory, Query Implementing Classes: AccessType, PersistentAttributeType, BasicPermission, BindableType, ByteIdentity, CacheRetrieveMode, CacheStoreMode, CascadeType, CharIdentity, Trimspec, DiscriminatorStrategy, DiscriminatorType