001//
002// NAME
003//    Type.java
004//
005// COPYRIGHT
006//    Copyright 2007-2014 TIBCO Software Inc. ALL RIGHTS RESERVED.
007//    TIBCO Software Inc. Confidential Information
008//
009// HISTORY
010//    $Revision: 1.1.2.84 $ $Date: 2014/02/06 20:35:16 $
011//
012// WARNINGS
013//    THIS FILE IS GENERATED, DO NOT EDIT
014//
015
016package com.kabira.platform.osstats;
017
018import java.util.*;
019import com.kabira.platform.annotation.*;
020
021
022/**
023<p>
024       Object Type Statistics
025<p>
026The Type interface provides control over statistics that
027are collected per object type.
028<p>
029An operation is provided which is useful for determining the
030memory usage of an individual object.
031
032
033*/
034
035@Managed
036public class Type
037{
038        private static final String _RuntimeType = "osstats::Type";
039
040/**
041Create a new Type
042
043*/
044        public Type()
045        {
046                super();
047        }
048
049
050        /**
051        @deprecated This method is deprecated, please use
052the Type.memoryUsage() method.
053
054
055        */
056
057        @Deprecated
058        public final native void typeSize(
059                        final java.lang.Object object,
060                        com.kabira.platform.OutParameter<String> report);
061
062
063        /**
064        <p>
065       Report on the memory usage of an object.
066@param object                 An instance of the object to report
067                upon.
068
069@return                The report.
070<p>
071<p>
072Return a report containing information about
073the memory allocations for the passed in
074object.
075<p>
076The memory size information is reported in two
077parts; the requested allocation size and the
078actual size allocated.  The actual size
079allocated is a combination of the requested
080size plus the allocation header, and is then
081rounded up to the nearest allocator bucket
082size. In PRODUCTION mode the allocation header
083is 40 bytes, in DEVELOPMENT mode it is 80
084bytes.
085<p>
086The reporting of complex types involves the
087examination of each complex attribute in the
088instance passed in, and reporting the current
089size of the data stored. This is done recursively
090through any embedded structure, sequence, or any
091stored in the type. When using this method, a
092representative sample of the instance should be
093created and populated before calling this method.
094
095<p>
096<b>Warnings: </b><p>
097Object sizes are only accurate for committed
098objects.  The object must be created in a
099separate transaction before it is used to
100report on sizes.
101
102
103        */
104
105        public final native String memoryUsage(
106                        final java.lang.Object object);
107
108}