Groovy Documentation

gpars.serial
[Java] Class SerialHandle

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

public 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

Authors:
Alex Tkachman


Field Summary
protected SerialContext context

local host

protected UUID serialId

serial id of the object

 
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
org.codehaus.groovy.util.ManagedReference#get(), org.codehaus.groovy.util.ManagedReference#clear(), org.codehaus.groovy.util.ManagedReference#finalizeReference(), org.codehaus.groovy.util.ManagedReference#wait(long), org.codehaus.groovy.util.ManagedReference#wait(long, int), org.codehaus.groovy.util.ManagedReference#wait(), org.codehaus.groovy.util.ManagedReference#equals(java.lang.Object), org.codehaus.groovy.util.ManagedReference#toString(), org.codehaus.groovy.util.ManagedReference#hashCode(), org.codehaus.groovy.util.ManagedReference#getClass(), org.codehaus.groovy.util.ManagedReference#notify(), org.codehaus.groovy.util.ManagedReference#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


 
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
Returns:
The serial id


getSubscribers

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


subscribe

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


unsubscribe

public void unsubscribe(SerialContext context)


 

Groovy Documentation