|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sapia.ubik.rmi.server.gc.ServerGC
public class ServerGC
This class implements the server-side distributed garbage collection algorithm.
| Field Summary | |
|---|---|
static long |
GC_INTERVAL
|
static long |
GC_TIMEOUT
|
| Constructor Summary | |
|---|---|
ServerGC(TaskManager taskman)
Creates a new ServerGC instance. |
|
| Method Summary | |
|---|---|
void |
clear()
|
boolean |
containsClient(VmId id)
Returns true if this instance contains the passed in VmId. |
MBeanContainer |
createMBean()
Internally creates a MBean and its ObjectName, that are
returned in a MBeanContainer. |
void |
dereference(VmId id,
OID oid)
Dereferences a given object identifier. |
void |
exec(TaskContext ctx)
|
int |
getClientCount()
|
long |
getInterval()
|
int |
getRefCount(VmId id,
OID oid)
Returns the total number of references held on the given object identifier. |
int |
getSpecificCount(VmId id,
OID oid)
Returns the total number of references held on the given object by the client whose host corresponds to the passed in VmId. |
long |
getTimeout()
|
void |
reference(VmId id,
OID oid)
Increments the reference count of the given object identifier, for the client whose VmId is given. |
void |
registerRef(VmId id,
OID oid,
java.lang.Object o)
Registers a given object internally so that it is not garbage collected before clients themselves garbage collect it. |
void |
setTimeout(long timeout)
|
void |
touch(VmId id)
Touches the client info of the vm id passed in. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long GC_TIMEOUT
public static final long GC_INTERVAL
| Constructor Detail |
|---|
public ServerGC(TaskManager taskman)
ServerGC instance.
taskman - | Method Detail |
|---|
public int getRefCount(VmId id,
OID oid)
id - a VmId.oid - an OID.
int.
public int getSpecificCount(VmId id,
OID oid)
VmId.
public boolean containsClient(VmId id)
VmId.
true if this instance contains the passed in
VmId.
public void reference(VmId id,
OID oid)
VmId is given.
address - the client's VmId.oid - the object identifier of whose reference count to
increment.
public void registerRef(VmId id,
OID oid,
java.lang.Object o)
id - the VmId of the client to whom a stub
corresponding to the passed in object is returned (this in fact creates
a remote reference on the object).oid - the OID that identifies the passed in object
locally.the - object for which a stub is eventually returned to the client.
public void dereference(VmId id,
OID oid)
id - the VmId of the client from which the
dereferencing call comes.oid - the OID to dereference.public void touch(VmId id)
id - public void exec(TaskContext ctx)
exec in interface Taskctx - this instance's TaskContextpublic void clear()
public long getInterval()
getInterval in interface ServerGCMBeanConsts.SERVER_GC_INTERVALpublic long getTimeout()
getTimeout in interface ServerGCMBeanConsts.SERVER_GC_TIMEOUTpublic void setTimeout(long timeout)
setTimeout in interface ServerGCMBeanpublic int getClientCount()
getClientCount in interface ServerGCMBean
public MBeanContainer createMBean()
throws java.lang.Exception
MBeanFactoryObjectName, that are
returned in a MBeanContainer.
createMBean in interface MBeanFactoryMBeanContainer
java.lang.Exception - if a problem occurs while creating the MBean or its
object name.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||