@PublicAPI public class TopologyDescriptor extends Object implements Serializable
ResourceManager.getAtMostNodes
request.
User may create its own instance of available descriptors and parameterize it or use one of predefined constants when it is sufficient.
Modifier and Type | Field and Description |
---|---|
static TopologyDescriptor |
ARBITRARY
no constraint on node location
|
static TopologyDescriptor |
BEST_PROXIMITY
the set of closest nodes
|
static TopologyDescriptor |
DIFFERENT_HOSTS_EXCLUSIVE
the set of nodes one per host exclusively
(hosts are reserved for the user)
|
static TopologyDescriptor |
MULTIPLE_HOSTS_EXCLUSIVE
the set of nodes of several hosts exclusively
(hosts are reserved for the user)
|
static TopologyDescriptor |
SINGLE_HOST
the set of nodes on a single host
|
static TopologyDescriptor |
SINGLE_HOST_EXCLUSIVE
the set of nodes of a single host exclusively
(the host is reserved for the user)
|
Modifier | Constructor and Description |
---|---|
protected |
TopologyDescriptor(boolean topologyBased)
Creates the descriptor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isTopologyBased()
Defines if selection scripts have to be executed on all
available nodes before the topology information will be processed.
|
String |
toString()
Returns the string representation of the descriptor.
|
public static final TopologyDescriptor ARBITRARY
public static final TopologyDescriptor BEST_PROXIMITY
public static final TopologyDescriptor SINGLE_HOST
public static final TopologyDescriptor SINGLE_HOST_EXCLUSIVE
public static final TopologyDescriptor MULTIPLE_HOSTS_EXCLUSIVE
public static final TopologyDescriptor DIFFERENT_HOSTS_EXCLUSIVE
protected TopologyDescriptor(boolean topologyBased)
topologyBased
- indicates that descriptor requires the topology information in the resource manager.
It affects the scripts execution strategy: if true selection scripts are executed on all nodes
first and then the topology information is taken into account. If false scripts are executed
only on required number of nodes.
If this field is set to false the descriptor could be used even when the topology is
disabled in the resource manager.