org.apache.jdo.impl.state
Class ReachabilityHandler

java.lang.Object
  extended byorg.apache.jdo.impl.state.ReachabilityHandler

class ReachabilityHandler
extends java.lang.Object

This is the helper class to process persistence-by-reachability requests from the StateManager.

Version:
1.0
Author:
Marina Vatkina

Nested Class Summary
(package private)  class ReachabilityHandler.AutoPersistentProcessor
          Processor for MakeAutoPersistent request.
(package private)  class ReachabilityHandler.MakePersistentProcessor
          Processor for MakePersistent request.
(package private)  class ReachabilityHandler.Processor
          An abstract class that knows how process reachability requests.
 
Field Summary
private static org.apache.commons.logging.Log logger
          Logger instance
private static I18NHelper msg
          I18N message handler
private  java.util.HashMap processors
          Map of possible processors.
private static ReachabilityHandler singleton
          The singleton ReachabilityHandler instance.
 
Constructor Summary
private ReachabilityHandler()
          Constructs a new ReachabilityHandler without specific parameters.
 
Method Summary
private  void debug(java.lang.String msg)
          Tracing method
private  boolean debugging()
          Verifies if debugging is enabled.
private  java.lang.Boolean getBoolean(boolean type)
          Translates boolean value into Boolean.
static ReachabilityHandler getInstance()
          Get the ReachabilityHandler singleton instance.
(package private)  void process(java.lang.Object o, PersistenceManagerInternal pm, boolean type)
          Process recursevely requests for persistence-by-reachability.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

singleton

private static final ReachabilityHandler singleton
The singleton ReachabilityHandler instance.


processors

private final java.util.HashMap processors
Map of possible processors.


msg

private static final I18NHelper msg
I18N message handler


logger

private static final org.apache.commons.logging.Log logger
Logger instance

Constructor Detail

ReachabilityHandler

private ReachabilityHandler()
Constructs a new ReachabilityHandler without specific parameters.

Method Detail

getInstance

public static ReachabilityHandler getInstance()
Get the ReachabilityHandler singleton instance.

Returns:
an instance of ReachabilityHandler

process

void process(java.lang.Object o,
             PersistenceManagerInternal pm,
             boolean type)
Process recursevely requests for persistence-by-reachability.

Parameters:
o - Object to process.
pm - the PersistenceManagerInternal instance associated with the caller.
type - true if the request comes during the commit operation.

getBoolean

private java.lang.Boolean getBoolean(boolean type)
Translates boolean value into Boolean.

Parameters:
type - as boolean.
Returns:
corresponding Boolean object.

debug

private void debug(java.lang.String msg)
Tracing method

Parameters:
msg - String to display

debugging

private boolean debugging()
Verifies if debugging is enabled.

Returns:
true if debugging is enabled.