|
org.codehaus.gpars | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.util.ManagedReference groovyx.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
Nested Class Summary | |
---|---|
private static class |
SerialHandle.LocalSerialHandle
|
private static class |
SerialHandle.RemoteSerialHandle
|
Field Summary | |
---|---|
private WithSerialId |
anchor
|
private static org.codehaus.groovy.util.ReferenceBundle |
bundle
|
protected SerialContext |
context
Construct handle for object with given id to it |
private static org.codehaus.groovy.util.ReferenceManager |
manager
|
private static java.lang.ref.ReferenceQueue |
queue
|
protected java.util.UUID |
serialId
|
private java.lang.Object |
subscribers
|
Constructor Summary | |
private SerialHandle(WithSerialId value, java.util.UUID id)
|
Method Summary | |
---|---|
static SerialHandle
|
create(WithSerialId obj, java.util.UUID id)
|
void
|
finalizeReference()
|
java.util.UUID
|
getSerialId()
Getter for subscribers |
java.lang.Object
|
getSubscribers()
|
void
|
subscribe(SerialContext context)
|
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, int), org.codehaus.groovy.util.ManagedReference#wait(long), 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 java.lang.Object | |
---|---|
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), 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() |
Field Detail |
---|
@java.lang.SuppressWarnings} else { private WithSerialId anchor
private static final org.codehaus.groovy.util.ReferenceBundle bundle
protected final SerialContext context
value
- The value to associate with the idid
- The id, if null a new id will be generated
private static final org.codehaus.groovy.util.ReferenceManager manager
private static final java.lang.ref.ReferenceQueue queue
protected final java.util.UUID serialId
private java.lang.Object subscribers
Constructor Detail |
---|
private SerialHandle(WithSerialId value, java.util.UUID id)
Method Detail |
---|
public static SerialHandle create(WithSerialId obj, java.util.UUID id)
@java.lang.Override* Subscribes host as interested in the object public void finalizeReference()
public java.util.UUID getSerialId()
public java.lang.Object getSubscribers()
@java.lang.SuppressWarningsif (remoteHost == context) { public void subscribe(SerialContext context)
@java.lang.SuppressWarnings public void unsubscribe(SerialContext context)
Copyright © 2008–2013 Václav Pech. All Rights Reserved.