NetKernel APIs


com.ten60.netkernel.container
Class HouseKeeper

java.lang.Object
  extended bycom.ten60.netkernel.urii.representation.SimpleRepresentationImpl
      extended bycom.ten60.netkernel.container.ComponentImpl
          extended bycom.ten60.netkernel.container.HouseKeeper
All Implemented Interfaces:
IAspectBinaryStream, IComponent, IURAspect, IURRepresentation, Runnable

public class HouseKeeper
extends ComponentImpl
implements Runnable

HouseKeeper system component periodically polls all other system components to do their housework. Is a job of its own it keeps a close eye on system memory.


Field Summary
static URIdentifier URI
          our URI
 
Fields inherited from class com.ten60.netkernel.urii.representation.SimpleRepresentationImpl
mMeta
 
Constructor Summary
HouseKeeper()
          Creates a new instance of HouseKeeper
 
Method Summary
 void doPeriodicHouseKeeping()
          calculate memory statistics by watching for GC events
 long getBaselineMemory()
          return a filtered estimate of our GC baseline memory usage- i.e how much memory are we actually holding that cannot be released
 long getMaxMemory()
           
 long getPeakMemory()
          return a filtered estimate of our peak memory usage0- i.e.
 void run()
          loops until stopped performing housework and sleeping between
 void start(Container aContainer)
          starts the housekeeper.
 void stop()
          stops its thread
 void write(OutputStream aStream)
          write memory statistics out as XML
 
Methods inherited from class com.ten60.netkernel.container.ComponentImpl
getEncoding, getURI
 
Methods inherited from class com.ten60.netkernel.urii.representation.SimpleRepresentationImpl
getAspect, getAspects, getMeta, hasAspect
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ten60.netkernel.urii.IURRepresentation
getAspect, getAspects, getMeta, hasAspect
 

Field Detail

URI

public static final URIdentifier URI
our URI

Constructor Detail

HouseKeeper

public HouseKeeper()
Creates a new instance of HouseKeeper

Method Detail

start

public void start(Container aContainer)
           throws NetKernelException
starts the housekeeper. It gets configuration from Config component and starts its thread

Specified by:
start in interface IComponent
Overrides:
start in class ComponentImpl
Throws:
NetKernelException

stop

public void stop()
stops its thread

Specified by:
stop in interface IComponent
Overrides:
stop in class ComponentImpl

run

public void run()
loops until stopped performing housework and sleeping between

Specified by:
run in interface Runnable

doPeriodicHouseKeeping

public void doPeriodicHouseKeeping()
calculate memory statistics by watching for GC events

Specified by:
doPeriodicHouseKeeping in interface IComponent
Overrides:
doPeriodicHouseKeeping in class ComponentImpl

write

public void write(OutputStream aStream)
           throws IOException
write memory statistics out as XML

Specified by:
write in interface IAspectBinaryStream
Overrides:
write in class ComponentImpl
Throws:
IOException

getBaselineMemory

public final long getBaselineMemory()
return a filtered estimate of our GC baseline memory usage- i.e how much memory are we actually holding that cannot be released


getMaxMemory

public final long getMaxMemory()

getPeakMemory

public final long getPeakMemory()
return a filtered estimate of our peak memory usage0- i.e. how much memory are will using as a working set


NetKernel APIs


Copyright © 2002-2004 1060 Research Ltd. All Rights Reserved.