ObjectDB ObjectDB

Internal Website Search

1-10 of 200 resultsRefresh

Shared (L2) Entity Cache

that it manages. The persistence context serves as a first level cache. An attempt to retrieve ... is one EntityManager. This section describes a level 2 (L2) cache of entity objects, which is managed ... of this cache makes it useful in applications that use many short term EntityManager instances. In addition


javax.persistence Interface Cache Interface used to interact with the second-level cache. If a cache is not in use, the methods of this interface have no effect, except for contains, which returns false. Since: JPA 2.0 Learn how to use Cache in Chapter 3 of the ObjectDB/JPA manual. boolean contains

contains(cls, primaryKey)

Method javax.persistence.Cache boolean contains( Class cls, Object primaryKey ) Whether the cache contains data for the given entity. Parameters: cls - entity class primaryKey - primary key Returns: boolean indicating whether the entity is in the cache Since: JPA 2.0


Static Field javax.jdo.Constants String PMF_ATTRIBUTE_IGNORE_CACHE The name of the persistence manager factory element's "ignore-cache" attribute. Since: JDO 2.1


Method javax.persistence.Cache void evictAll() Clear the cache. Since: JPA 2.0


Method javax.persistence.Cache void evict( Class cls ) Remove the data for entities of the specified class (and its subclasses) from the cache. Parameters: cls - entity class Since: JPA 2.0

evict(cls, primaryKey)

Method javax.persistence.Cache void evict( Class cls, Object primaryKey ) Remove the data for the given entity from the cache. Parameters: cls - entity class primaryKey - primary key Since: JPA 2.0


Static Field javax.jdo.Constants String PROPERTY_IGNORE_CACHE "javax.jdo.option.IgnoreCache" Since: JDO 2.1 See Also: PersistenceManagerFactory.getIgnoreCache()

Database Management Settings

="." mode="write" /> cache="64mb" max-threads="10" synchronized="false" /> cache results ... . The element cache="64mb" max-threads="10" /> The element

Entity Management Settings

: <cache ref="weak" level2="0mb ... " - reflection is used even for enhanced classes (for troubleshooting). The <cache> element <cache ref="weak" level2="0mb" /> The <cache> element specifies settings of the two cache mechanisms

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support