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
Modifiers | Name | Description |
---|---|---|
private static class |
SerialHandle.LocalSerialHandle |
|
private static class |
SerialHandle.RemoteSerialHandle |
Modifiers | Name | Description |
---|---|---|
private WithSerialId |
anchor |
|
private static org.codehaus.groovy.util.ReferenceBundle |
bundle |
|
protected SerialContext |
context |
local host |
private static org.codehaus.groovy.util.ReferenceManager |
manager |
|
private static java.lang.ref.ReferenceQueue<WithSerialId> |
queue |
|
protected java.util.UUID |
serialId |
serial id of the object |
private java.lang.Object |
subscribers |
remote hosts subscribed to this objects |
Constructor and description |
---|
private SerialHandle
(WithSerialId value, java.util.UUID id) Construct handle for object with given id to it |
Type | Name and description |
---|---|
static SerialHandle |
create(WithSerialId obj, java.util.UUID id) |
void |
finalizeReference() |
java.util.UUID |
getSerialId() Serial id of the object |
java.lang.Object |
getSubscribers() Getter for subscribers |
void |
subscribe(SerialContext context) Subscribes host as interested in the object |
void |
unsubscribe(SerialContext context) |
Methods inherited from class | Name |
---|---|
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(), org.codehaus.groovy.util.ManagedReference#wait(long, int), org.codehaus.groovy.util.ManagedReference#wait(long), 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() |
class java.lang.Object |
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
local host
serial id of the object
remote hosts subscribed to this objects
Construct handle for object with given id to it
value
- The value to associate with the idid
- The id, if null a new id will be generatedSerial id of the object
Getter for subscribers
Subscribes host as interested in the object
context
- The subscription context to useCopyright © 2008–2014 Václav Pech. All Rights Reserved.