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

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


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

Database Management Settings

="." mode="write" /> <locking version-check="true" /> <processing cache="64mb" max-threads="10" synchronized="false" />   <index-update enabled="true" priority="40" /> <query-cache results ... . The <processing> element <processing cache="64mb" max-threads="10" /> The <processing> element


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


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

[ODB1] Chapter 6 - Persistent Objects

Cache As noted before, persistent objects are memory objects that represent some content in the database ... a cache of persistent objects that are in use by the application. If the cache already contains ... is not found in the cache, a new object is constructed, filled with the content of the database

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