Groovy Documentation

gpars.serial
Class SerialHandle

java.lang.Object
  org.codehaus.groovy.util.ManagedReference
      gpars.serial.SerialHandle

class SerialHandle
extends org.codehaus.groovy.util.ManagedReference

Weak reference to object, which was serialized to remote hosts. Also keep ids of all hosts, where the object was serialized.

While subscribed by remote nodes it keeps object alive by holding strong reference (anchor) to it

author:
Alex Tkachman


Nested Class Summary
class SerialHandle.LocalSerialHandle

class SerialHandle.RemoteSerialHandle

 
Field Summary
protected SerialContext context

local host

protected UUID serialId

serial id of the object

 
Constructor Summary
private SerialHandle(WithSerialId value, UUID id)

Construct handle for object with given id to it

 
Method Summary
static SerialHandle create(WithSerialId obj, UUID id)

void finalizeReference()

UUID getSerialId()

Serial id of the object

Object getSubscribers()

Getter for subscribers

void subscribe(SerialContext context)

Subscribes host as interested in the object

void unsubscribe(SerialContext context)

 
Methods inherited from class org.codehaus.groovy.util.ManagedReference
get, clear, finalizeReference, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Field Detail

context

protected final SerialContext context
local host


serialId

protected final UUID serialId
serial id of the object


 
Constructor Detail

SerialHandle

private SerialHandle(WithSerialId value, UUID id)
Construct handle for object with given id to it
param:
value


 
Method Detail

create

public static SerialHandle create(WithSerialId obj, UUID id)


finalizeReference

@Override
public void finalizeReference()


getSerialId

public UUID getSerialId()
Serial id of the object
return:
The serial id


getSubscribers

public Object getSubscribers()
Getter for subscribers
return:
The current subscribers


subscribe

public void subscribe(SerialContext context)
Subscribes host as interested in the object
param:
context


unsubscribe

public void unsubscribe(SerialContext context)


 

Groovy Documentation