pt.ist.fenixframework.txintrospector
Class TxStats

Package class diagram package TxStats
java.lang.Object
  extended by pt.ist.fenixframework.txintrospector.TxStats
All Implemented Interfaces:
TxIntrospector

public class TxStats
extends Object
implements TxIntrospector


Nested Class Summary
 
Nested classes/interfaces inherited from interface pt.ist.fenixframework.txintrospector.TxIntrospector
TxIntrospector.Entry, TxIntrospector.RelationChangelog
 
Field Summary
static boolean ENABLED
           
static RelationListener STATS_LISTENER
           
 
Fields inherited from interface pt.ist.fenixframework.txintrospector.TxIntrospector
TXINTROSPECTOR_ON_CONFIG_KEY, TXINTROSPECTOR_ON_CONFIG_VALUE
 
Method Summary
 void addModifiedObject(DomainObject object)
           
 void addModifiedRelation(TxIntrospector.RelationChangelog relation)
          Adds the RelationChangeLog to the list of relations changed during this transaction.
 void addNewObject(DomainObject object)
           
static boolean checkEnabled()
           
 Collection<DomainObject> getDirectlyModifiedObjects()
          Returns a Collection containing objects which had any of their slots modified, excluding those that only had relationship changes.
static TxStats getInstance(TxStats txStats)
           
 Collection<DomainObject> getModifiedObjects()
          Returns a Collection containing both objects which had any of their slots modified and those that had relationship changes.
 Collection<DomainObject> getNewObjects()
          Returns a Collection containing new objects created during this transaction.
 Collection<TxIntrospector.Entry> getReadSetLog()
          Returns the read-set of this transaction.
 Collection<TxIntrospector.RelationChangelog> getRelationsChangelog()
          Returns a Collection containing the relations changed during this transaction.
 Collection<TxIntrospector.Entry> getWriteSetLog()
          Returns the write-set of this transaction.
static TxStats newInstance()
           
 String toString()
           
 String unsafeToString()
          Version of toString() that may fail because it uses the DomainObject's toString() operation to print them, as calling toString() on a DomainObject may cause further changes to objects or relations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ENABLED

public static final boolean ENABLED

STATS_LISTENER

public static final RelationListener STATS_LISTENER
Method Detail

checkEnabled

public static boolean checkEnabled()

newInstance

public static TxStats newInstance()

getInstance

public static TxStats getInstance(TxStats txStats)

addNewObject

public void addNewObject(DomainObject object)

addModifiedObject

public void addModifiedObject(DomainObject object)

addModifiedRelation

public void addModifiedRelation(TxIntrospector.RelationChangelog relation)
Description copied from interface: TxIntrospector
Adds the RelationChangeLog to the list of relations changed during this transaction.

Specified by:
addModifiedRelation in interface TxIntrospector
Parameters:
relation - The change log to be added.

toString

public String toString()
Overrides:
toString in class Object

unsafeToString

public String unsafeToString()
Version of toString() that may fail because it uses the DomainObject's toString() operation to print them, as calling toString() on a DomainObject may cause further changes to objects or relations.


getNewObjects

public Collection<DomainObject> getNewObjects()
Description copied from interface: TxIntrospector
Returns a Collection containing new objects created during this transaction.

Specified by:
getNewObjects in interface TxIntrospector
Returns:
Collection of new objects

getDirectlyModifiedObjects

public Collection<DomainObject> getDirectlyModifiedObjects()
Description copied from interface: TxIntrospector
Returns a Collection containing objects which had any of their slots modified, excluding those that only had relationship changes.

Specified by:
getDirectlyModifiedObjects in interface TxIntrospector
Returns:
Collection of directly modified objects

getModifiedObjects

public Collection<DomainObject> getModifiedObjects()
Description copied from interface: TxIntrospector
Returns a Collection containing both objects which had any of their slots modified and those that had relationship changes.

Specified by:
getModifiedObjects in interface TxIntrospector
Returns:
Collection of modified objects

getReadSetLog

public Collection<TxIntrospector.Entry> getReadSetLog()
Description copied from interface: TxIntrospector
Returns the read-set of this transaction.

Specified by:
getReadSetLog in interface TxIntrospector
Returns:
Read-set of the this transaction

getWriteSetLog

public Collection<TxIntrospector.Entry> getWriteSetLog()
Description copied from interface: TxIntrospector
Returns the write-set of this transaction.

Specified by:
getWriteSetLog in interface TxIntrospector
Returns:
Write-set of the this transaction

getRelationsChangelog

public Collection<TxIntrospector.RelationChangelog> getRelationsChangelog()
Description copied from interface: TxIntrospector
Returns a Collection containing the relations changed during this transaction.

Specified by:
getRelationsChangelog in interface TxIntrospector
Returns:
Collection of relation changes


Copyright © 2013. All Rights Reserved.