com.arjuna.ats.arjuna.tools.osb.mbean
Class ObjStoreBrowser

java.lang.Object
  extended by com.arjuna.ats.arjuna.tools.osb.mbean.ObjStoreBrowser
All Implemented Interfaces:
ObjStoreBrowserMBean, ObjStoreItemMBean

public class ObjStoreBrowser
extends Object
implements ObjStoreBrowserMBean

An MBean implementation for walking an ObjectStore and creating/deleting MBeans that represent completing transactions (ie ones on which the user has called commit)


Field Summary
static String OBJ_STORE_BROWSER_HANDLERS
           
 
Constructor Summary
ObjStoreBrowser()
           
ObjStoreBrowser(String logDir)
           
 
Method Summary
 StringBuilder dump(StringBuilder sb)
           
 UidWrapper findUid(String uid)
           
 UidWrapper findUid(Uid uid)
          See if the given uid has previously been registered as an MBean
 void probe()
          See if any new MBeans need to be registered or if any existing MBeans no longer exist as ObjectStore entries.
 List<UidWrapper> probe(String type, String beantype)
          Register new MBeans of the requested type (or unregister ones whose corresponding ObjectStore entry has been removed)
 void setExposeAllRecordsAsMBeans(boolean exposeAllLogs)
           
 boolean setType(String osTypeClassName, String beanTypeClassName)
          Tell the browser which beans to use for particular Object Store Action type
 void setTypes(Map<String,String> types)
          Deprecated. 
 void start()
          Initialise the MBean
 void stop()
          Unregister all MBeans representing objects in the ObjectStore represented by this MBean
 void viewSubordinateAtomicActions(boolean enable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OBJ_STORE_BROWSER_HANDLERS

public static final String OBJ_STORE_BROWSER_HANDLERS
See Also:
Constant Field Values
Constructor Detail

ObjStoreBrowser

public ObjStoreBrowser()

ObjStoreBrowser

public ObjStoreBrowser(String logDir)
Method Detail

start

public void start()
Initialise the MBean


stop

public void stop()
Unregister all MBeans representing objects in the ObjectStore represented by this MBean


setTypes

@Deprecated
public void setTypes(Map<String,String> types)
Deprecated. 

This method is deprecated in favour of @setType The issue with this method is there is no mechanism for determining which class is responsible for a given OS type. Define which object store types will registered as MBeans

Parameters:
types - the list of ObjectStore types that can be represented as MBeans

setType

public boolean setType(String osTypeClassName,
                       String beanTypeClassName)
Tell the browser which beans to use for particular Object Store Action type

Parameters:
osTypeClassName -
beanTypeClassName -
Returns:

dump

public StringBuilder dump(StringBuilder sb)

findUid

public UidWrapper findUid(Uid uid)
See if the given uid has previously been registered as an MBean

Parameters:
uid - the unique id representing an ObjectStore entry
Returns:
the MBean wrapper corresponding to the requested Uid (or null if it hasn't been registered)

findUid

public UidWrapper findUid(String uid)

probe

public void probe()
See if any new MBeans need to be registered or if any existing MBeans no longer exist as ObjectStore entries.

Specified by:
probe in interface ObjStoreBrowserMBean

viewSubordinateAtomicActions

public void viewSubordinateAtomicActions(boolean enable)
Specified by:
viewSubordinateAtomicActions in interface ObjStoreBrowserMBean

setExposeAllRecordsAsMBeans

public void setExposeAllRecordsAsMBeans(boolean exposeAllLogs)
Specified by:
setExposeAllRecordsAsMBeans in interface ObjStoreBrowserMBean

probe

public List<UidWrapper> probe(String type,
                              String beantype)
Register new MBeans of the requested type (or unregister ones whose corresponding ObjectStore entry has been removed)

Parameters:
type - the ObjectStore entry type
beantype - the class name of the MBean implementation used to represent the request type
Returns:
the list of MBeans representing the requested ObjectStore type


Copyright © 2012. All Rights Reserved.