groovyx.gpars.serial
Class SerialContext
java.lang.Object
groovyx.gpars.serial.SerialContext
- Direct Known Subclasses:
- RemoteHost
public abstract class SerialContext
- extends java.lang.Object
- Author:
- Alex Tkachman
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
threadContext
private static final java.lang.ThreadLocal<SerialContext> threadContext
localHost
protected final SerialHandles localHost
hostId
protected final java.util.UUID hostId
SerialContext
public SerialContext(SerialHandles localHost,
java.util.UUID hostId)
get
public static SerialContext get()
getHostId
public java.util.UUID getHostId()
enter
public final void enter()
- Enter to the context
leave
public final void leave()
- Leave this context
getLocalHostId
public java.util.UUID getLocalHostId()
add
public void add(SerialHandle serialHandle)
remove
public void remove(SerialHandle serialHandle)
get
public SerialHandle get(java.util.UUID id)
finalizeHandle
public void finalizeHandle(SerialHandle handle)
getSerialHost
public SerialContext getSerialHost(java.util.UUID hostId,
java.lang.Object attachment)
write
public abstract void write(SerialMsg msg)