public class BlockApiHandle extends Object
Block
, define
your application as a
BlockWithApiHandle
.
NOTE: Depending on the context in which this class is used, some of the
handles may not be set. For instance, the masterApi
is not set when
this is in the context of a worker. Trying to get access to a handle when
it is not set will result in a runtime exception. Instead, you should first
use methods like the isMasterApiSet()
to check.
The *Api fields are transient as we do not need/want to serialize them. They
will be set at the appropriate time by the framework.Constructor and Description |
---|
BlockApiHandle() |
Modifier and Type | Method and Description |
---|---|
BlockMasterApi |
getMasterApi() |
BlockWorkerContextReceiveApi |
getWorkerContextReceiveApi() |
BlockWorkerContextSendApi |
getWorkerContextSendApi() |
BlockWorkerReceiveApi |
getWorkerReceiveApi() |
BlockWorkerSendApi |
getWorkerSendApi() |
boolean |
isMasterApiSet() |
boolean |
isWorkerContextReceiveApiSet() |
boolean |
isWorkerContextSendApiSet() |
boolean |
isWorkerReceiveApiSet() |
boolean |
isWorkerSendApiSet() |
void |
setMasterApi(BlockMasterApi api) |
void |
setWorkerContextReceiveApi(BlockWorkerContextReceiveApi api) |
void |
setWorkerContextSendApi(BlockWorkerContextSendApi api) |
void |
setWorkerReceiveApi(BlockWorkerReceiveApi api) |
void |
setWorkerSendApi(BlockWorkerSendApi api) |
public void setMasterApi(BlockMasterApi api)
public void setWorkerReceiveApi(BlockWorkerReceiveApi api)
public void setWorkerSendApi(BlockWorkerSendApi api)
public void setWorkerContextReceiveApi(BlockWorkerContextReceiveApi api)
public void setWorkerContextSendApi(BlockWorkerContextSendApi api)
public boolean isMasterApiSet()
public boolean isWorkerReceiveApiSet()
public boolean isWorkerSendApiSet()
public boolean isWorkerContextReceiveApiSet()
public boolean isWorkerContextSendApiSet()
public BlockMasterApi getMasterApi()
public BlockWorkerReceiveApi getWorkerReceiveApi()
public BlockWorkerSendApi getWorkerSendApi()
public BlockWorkerContextReceiveApi getWorkerContextReceiveApi()
public BlockWorkerContextSendApi getWorkerContextSendApi()
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.