public class ServerGC extends Object implements Module, Task, ServerGCMBean
| Modifier and Type | Field and Description |
|---|---|
static long |
GC_INTERVAL |
static long |
GC_TIMEOUT |
| Constructor and Description |
|---|
ServerGC() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsClient(VmId id)
Returns true if this instance contains the passed in
VmId. |
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 |
init(ModuleContext context)
Called upon Ubik startup.
|
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,
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 |
start(ModuleContext context)
Called after
#init(), when all modules have initialized. |
void |
stop()
Called upon Ubik shutdown.
|
void |
touch(VmId id)
Touches the client info of the
VmId passed in. |
public static final long GC_TIMEOUT
public static final long GC_INTERVAL
public void init(ModuleContext context)
Modulepublic void start(ModuleContext context)
Module#init(), when all modules have initialized.public void stop()
Modulepublic int getRefCount(VmId id, OID oid)
id - a VmId.oid - an DefaultOID.int.public int getSpecificCount(VmId id, OID oid)
VmId.id - a VmIdoid - an DefaultOIDpublic boolean containsClient(VmId id)
VmId.true if this instance contains the passed in
VmId.public void reference(VmId id, OID oid)
VmId is given.public void registerRef(VmId id, OID oid, Object o)
public void dereference(VmId id, OID oid)
id - the VmId of the client from which the
dereferencing call comes.oid - the DefaultOID to dereference.public void touch(VmId id)
VmId passed in.id - a VmIdpublic 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 ServerGCMBeanCopyright © 2012 Sapia OSS. All Rights Reserved.