Class ByteTransferContext
- java.lang.Object
-
- org.apache.nemo.runtime.executor.transfer.ByteTransferContext
-
- Direct Known Subclasses:
ByteInputContext
,ByteOutputContext
public abstract class ByteTransferContext extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
deregister()
De-registers this context fromContextManager
.byte[]
getContextDescriptor()
org.apache.nemo.runtime.executor.transfer.ByteTransferContext.ContextId
getContextId()
java.lang.Throwable
getException()
java.lang.String
getRemoteExecutorId()
boolean
hasException()
abstract void
onChannelError(java.lang.Throwable cause)
Handles exception.protected void
setChannelError(java.lang.Throwable cause)
Sets exception.java.lang.String
toString()
-
-
-
Method Detail
-
getRemoteExecutorId
public final java.lang.String getRemoteExecutorId()
- Returns:
- the remote executor id.
-
getContextId
public final org.apache.nemo.runtime.executor.transfer.ByteTransferContext.ContextId getContextId()
- Returns:
- the identifier for this transfer context.
-
getContextDescriptor
public final byte[] getContextDescriptor()
- Returns:
- user-provided context descriptor.
-
hasException
public final boolean hasException()
- Returns:
- Whether this context has exception or not.
-
getException
public final java.lang.Throwable getException()
- Returns:
- The exception involved with this context, or
null
.
-
toString
public final java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
onChannelError
public abstract void onChannelError(@Nullable java.lang.Throwable cause)
Handles exception.- Parameters:
cause
- the cause of exception handling
-
setChannelError
protected final void setChannelError(@Nullable java.lang.Throwable cause)
Sets exception.- Parameters:
cause
- the exception to set
-
deregister
protected final void deregister()
De-registers this context fromContextManager
.
-
-