Session#setCacheMode(CacheMode)
| Modifier and Type | Field and Description |
|---|---|
| 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. |
| public static final CacheMode | IGNORE
The session will never interact with the cache, except to invalidate cache items when updates occur. |
| private final boolean | |
| private final boolean | |
| public static final CacheMode | NORMAL
The session may read items from the cache, and add items to the cache. |
| 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. |
| 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. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static CacheMode | Returns: The matching enum value.The externalized form. setting)Used to interpret externalized forms of this enum. |
| public boolean | Returns: true if cache reads are allowed; false otherwise.Does this cache mode indicate that reads are allowed? |
| public boolean | Returns: true if cache writes are allowed; false otherwise.Does this cache mode indicate that writes are allowed? |
| public static CacheMode | |
| public static CacheMode[] |
| GET | back to summary |
|---|---|
| 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. | |
| IGNORE | back to summary |
|---|---|
| public static final CacheMode IGNORE The session will never interact with the cache, except to invalidate cache items when updates occur. | |
| isGetEnabled | back to summary |
|---|---|
| private final boolean isGetEnabled | |
| isPutEnabled | back to summary |
|---|---|
| private final boolean isPutEnabled | |
| NORMAL | back to summary |
|---|---|
| public static final CacheMode NORMAL The session may read items from the cache, and add items to the cache. | |
| PUT | back to summary |
|---|---|
| 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 | back to summary |
|---|---|
| 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. | |
| CacheMode | back to summary |
|---|---|
| private CacheMode(boolean isPutEnabled, boolean isGetEnabled) | |
| interpretExternalSetting | back to summary |
|---|---|
| public static CacheMode interpretExternalSetting(String setting) Used to interpret externalized forms of this enum.
| |
| isGetEnabled | back to summary |
|---|---|
| public boolean isGetEnabled() Does this cache mode indicate that reads are allowed?
| |
| isPutEnabled | back to summary |
|---|---|
| public boolean isPutEnabled() Does this cache mode indicate that writes are allowed?
| |
| valueOf | back to summary |
|---|---|
| public static CacheMode valueOf(String name) | |
| values | back to summary |
|---|---|
| public static CacheMode[] values() | |