public abstract class NioPipeline extends Object implements MigratablePipeline, Closeable, Runnable
| Modifier and Type | Field and Description |
|---|---|
protected static int |
LOAD_BALANCING_BYTE |
protected static int |
LOAD_BALANCING_FRAME |
protected static int |
LOAD_BALANCING_HANDLE |
protected int |
loadType |
| Modifier and Type | Method and Description |
|---|---|
Channel |
getChannel() |
void |
onError(Throwable cause)
Is called when the
process() throws an exception. |
NioThread |
owner()
Get NioThread currently owning this pipeline.
|
void |
requestMigration(NioThread newOwner)
Migrates this pipeline to a different owner.
|
void |
run() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitloadprotected static final int LOAD_BALANCING_HANDLE
protected static final int LOAD_BALANCING_BYTE
protected static final int LOAD_BALANCING_FRAME
protected final int loadType
public Channel getChannel()
public NioThread owner()
MigratablePipelineIOBalancer can decide to migrate
a pipeline to another owner.owner in interface MigratablePipelinepublic void onError(Throwable cause)
process() throws an exception.
This method should only be called by the current owner.
The idiom to use a handler is:
try{
handler.handle();
} catch(Throwable t) {
handler.onError(t);
}
cause - public final void requestMigration(NioThread newOwner)
requestMigration in interface MigratablePipelinenewOwner - target NioThread this handler migrates toCopyright © 2018. All Rights Reserved.