|
NetKernel APIs |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ten60.netkernel.urii.representation.SimpleRepresentationImpl
com.ten60.netkernel.container.ComponentImpl
com.ten60.netkernel.container.HouseKeeper
public class HouseKeeper
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(java.io.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 |
|---|
public static final URIdentifier URI
| Constructor Detail |
|---|
public HouseKeeper()
| Method Detail |
|---|
public void start(Container aContainer)
throws NetKernelException
start in interface IComponentstart in class ComponentImplaContainer - the container we will execute inside
NetKernelException - thrown if we encounter any error during startuppublic void stop()
stop in interface IComponentstop in class ComponentImplpublic void run()
run in interface java.lang.Runnablepublic void doPeriodicHouseKeeping()
doPeriodicHouseKeeping in interface IComponentdoPeriodicHouseKeeping in class ComponentImpl
public void write(java.io.OutputStream aStream)
throws java.io.IOException
write in interface IAspectBinaryStreamwrite in class ComponentImplaStream - the output stream
java.io.IOException - thrown if we fail to writepublic final long getBaselineMemory()
public final long getMaxMemory()
public final long getPeakMemory()
|
NetKernel APIs |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||