Cumulus4j API
(1.0.1)

org.cumulus4j.store
Class PersistenceManagerConnection

java.lang.Object
  extended by org.cumulus4j.store.PersistenceManagerConnection

public class PersistenceManagerConnection
extends Object

Connection to the underlying datastore(s).

Cumulus4j can be used with either one or two underlying datastores. If it is used with two datastores, the actual data and the index information is stored separately. The meta-data of the persistence-capable classes is replicated (and thus present in both datastores).

Author:
Andy Jefferson, Marco หงุ่ยตระกูล-Schulze - marco at nightlabs dot de (added javadoc)

Constructor Summary
PersistenceManagerConnection(PersistenceManager pmData, PersistenceManager pmIndex)
           
 
Method Summary
 PersistenceManager getDataPM()
          Accessor for the PM to use for data.
 PersistenceManager getIndexPM()
          Accessor for the PM to use for indexes.
 boolean indexHasOwnPM()
          Determine, if there is a separate index-PM.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistenceManagerConnection

public PersistenceManagerConnection(PersistenceManager pmData,
                                    PersistenceManager pmIndex)
Method Detail

indexHasOwnPM

public boolean indexHasOwnPM()
Determine, if there is a separate index-PM.

Returns:
true, if there is a separate index-PM configured (i.e. getDataPM() and getIndexPM() return different objects); false otherwise (i.e. getDataPM() and getIndexPM() return the same PM).

getDataPM

public PersistenceManager getDataPM()
Accessor for the PM to use for data.

Returns:
The PM to use for data

getIndexPM

public PersistenceManager getIndexPM()
Accessor for the PM to use for indexes. This method falls back to the data-PM, if there is no separate index-PM. To determine, if there is a separate index-PM, it is recommended to use indexHasOwnPM().

Returns:
the PM to use for indexes. If there is no separate index-PM, this method returns the same as getDataPM().

Cumulus4j API
(1.0.1)

Copyright © 2012 NightLabs Consulting GmbH. All Rights Reserved.