Oracle® Fusion Middleware C++ API Reference for Oracle Coherence
12c (12.2.1.3.0)

E80355-01

AbstractHeapAnalyzer Class Reference

#include <coherence/lang/AbstractHeapAnalyzer.hpp>

Inherits Object, and HeapAnalyzer.

Inherited by ClassBasedHeapAnalyzer.

List of all members.


Detailed Description

AbstractHeapAnalyzer provides a starting point for writing custom heap analyzers.

Most notably it includes support for detecting analyzer re-entrance so that analyzers can avoid endlessly recursing if they create objects as part of the registration process.

Author:
mf 2008.04.27

Public Types

typedef spec::Handle Handle
 AbstractHeapAnalyzer Handle definition.
typedef spec::View View
 AbstractHeapAnalyzer View definition.
typedef spec::Holder Holder
 AbstractHeapAnalyzer Holder definition.

Public Member Functions

virtual TypedHandle
< const String
toString () const
 Capture a snapshot and output it to the supplied stream.

Protected Member Functions

virtual void safeRegisterObject (const Object &o)=0
 Registers an object with the heap analyzer.
virtual void safeUnregisterObject (const Object &o)=0
 Unregisters an object with the heap analyzer.
virtual void registerObject (const Object &o)
 Register a newly created Object with the system.

This method is called automatically by coherence::lang::Object once the Object has finished construction.

Parameters:
o the newly created Object.

virtual void unregisterObject (const Object &o)
 Unregister an Object with the system.

This method is called automatically by coherence::lang::Object just prior to the deletion of the Object. No new handles or views may be created to the object.

Parameters:
o the Object to unregister


Member Function Documentation

virtual void safeRegisterObject ( const Object o  )  [protected, pure virtual]

Registers an object with the heap analyzer.

Parameters:
o the object to register

Implemented in ClassBasedHeapAnalyzer.

virtual void safeUnregisterObject ( const Object o  )  [protected, pure virtual]

Unregisters an object with the heap analyzer.

Parameters:
o the object to unregister

Implemented in ClassBasedHeapAnalyzer.

virtual void registerObject ( const Object o  )  [protected, virtual]

Register a newly created Object with the system.

This method is called automatically by coherence::lang::Object once the Object has finished construction.

Parameters:
o the newly created Object.

Parameters:
o the object to register
If the calling thread is reentering this method return immediately otherwise delegates to safeRegisterObject.

Implements HeapAnalyzer.

Reimplemented in ClassBasedHeapAnalyzer.

virtual void unregisterObject ( const Object o  )  [protected, virtual]

Unregister an Object with the system.

This method is called automatically by coherence::lang::Object just prior to the deletion of the Object. No new handles or views may be created to the object.

Parameters:
o the Object to unregister

Parameters:
o the object to unregister
If the calling thread is reentering this method return immediately otherwise delegates to safeUnregisterObject.

Implements HeapAnalyzer.

Reimplemented in ClassBasedHeapAnalyzer.

virtual TypedHandle<const String> toString (  )  const [virtual]

Capture a snapshot and output it to the supplied stream.

Parameters:
out the stream to output to

Reimplemented from Object.


The documentation for this class was generated from the following file:
Copyright © 2000, 2017, Oracle and/or its affiliates. All rights reserved.