![]() |
GridGain C++
|
Defines a cluster group which contains all or a subset of cluster nodes. More...
#include <cluster_group.h>
Public Member Functions | |
ClusterGroup (impl::cluster::SP_ClusterGroupImpl impl) | |
Constructor. More... | |
ClusterGroup | ForAttribute (std::string name, std::string val) |
Get cluster group for nodes containing given name and value specified in user attributes. More... | |
ClusterGroup | ForCacheNodes (std::string cacheName) |
Get cluster group for all nodes that have cache with specified name, either in client or server modes. More... | |
ClusterGroup | ForClientNodes (std::string cacheName) |
Get cluster group for all client nodes that access cache with the specified name. More... | |
ClusterGroup | ForClients () |
Get a cluster group of nodes started in client mode. More... | |
ClusterGroup | ForDaemons () |
Get cluster group consisting from the daemon nodes. More... | |
ClusterGroup | ForDataNodes (std::string cacheName) |
Get ClusterGroup for all data nodes that have the cache with the specified name running. More... | |
ClusterGroup | ForHost (ClusterNode node) |
Get cluster group consisting from the nodes in this cluster group residing on the same host as the given node. More... | |
ClusterGroup | ForHost (std::string hostName) |
Get cluster group consisting from the nodes running on the host specified. More... | |
ClusterGroup | ForHosts (std::vector< std::string > hostNames) |
Get cluster group consisting from the nodes running on the hosts specified. More... | |
ClusterGroup | ForNode (ClusterNode node) |
Get cluster group for the given node. More... | |
ClusterGroup | ForNodeId (Guid id) |
Get cluster group for a node with the specified ID. More... | |
ClusterGroup | ForNodeIds (std::vector< Guid > ids) |
Get cluster group over nodes with specified node IDs. More... | |
ClusterGroup | ForNodes (std::vector< ClusterNode > nodes) |
Get cluster group over a given set of nodes. More... | |
ClusterGroup | ForOldest () |
Get cluster group with one oldest node from the current cluster group. More... | |
ClusterGroup | ForPredicate (IgnitePredicate< ClusterNode > *pred) |
Create a new cluster group which includes all nodes that pass the given predicate filter. More... | |
ClusterGroup | ForRandom () |
Get cluster group with one random node from the current cluster group. More... | |
ClusterGroup | ForRemotes () |
Get cluster group consisting from the nodes in this cluster group excluding the local node. More... | |
ClusterGroup | ForServers () |
Creates a cluster group of nodes started in server mode. More... | |
ClusterGroup | ForYoungest () |
Get cluster group with one youngest node in the current cluster group. More... | |
ClusterGroup | ForCpp () |
Creates a cluster group of cpp nodes. More... | |
ClusterNode | GetNode () |
Get first node from the list of nodes in this cluster group. More... | |
ClusterNode | GetNode (Guid nid) |
Get node for given ID from this cluster group. More... | |
std::vector< ClusterNode > | GetNodes () |
Get the vector of nodes in this cluster group. More... | |
IgnitePredicate< ClusterNode > * | GetPredicate () |
Get predicate that defines a subset of nodes for this cluster group. More... | |
Friends | |
class | impl::cluster::ClusterGroupImpl |
class | impl::IgniteImpl |
Defines a cluster group which contains all or a subset of cluster nodes.
Cluster group allows to group cluster nodes into various subgroups to perform distributed operations on them. The IgniteCluster interface itself also contains the ClusterGroup which makes an instance of IgniteCluster into a cluster group containing all cluster nodes. Use IgniteCluster::AsClusterGroup() to get the cluster group in this case.
ignite::cluster::ClusterGroup::ClusterGroup | ( | impl::cluster::SP_ClusterGroupImpl | impl | ) |
Constructor.
impl | Pointer to cluster group implementation. |
ClusterGroup ignite::cluster::ClusterGroup::ForAttribute | ( | std::string | name, |
std::string | val | ||
) |
Get cluster group for nodes containing given name and value specified in user attributes.
name | Name of the attribute. |
val | Optional attribute value to match. |
ClusterGroup ignite::cluster::ClusterGroup::ForCacheNodes | ( | std::string | cacheName | ) |
Get cluster group for all nodes that have cache with specified name, either in client or server modes.
cacheName | Cache name. |
ClusterGroup ignite::cluster::ClusterGroup::ForClientNodes | ( | std::string | cacheName | ) |
Get cluster group for all client nodes that access cache with the specified name.
cacheName | Cache name. |
ClusterGroup ignite::cluster::ClusterGroup::ForClients | ( | ) |
Get a cluster group of nodes started in client mode.
ClusterGroup ignite::cluster::ClusterGroup::ForCpp | ( | ) |
Creates a cluster group of cpp nodes.
ClusterGroup ignite::cluster::ClusterGroup::ForDaemons | ( | ) |
Get cluster group consisting from the daemon nodes.
ClusterGroup ignite::cluster::ClusterGroup::ForDataNodes | ( | std::string | cacheName | ) |
Get ClusterGroup for all data nodes that have the cache with the specified name running.
cacheName | Cache name. |
ClusterGroup ignite::cluster::ClusterGroup::ForHost | ( | ClusterNode | node | ) |
Get cluster group consisting from the nodes in this cluster group residing on the same host as the given node.
node | Cluster node. |
ClusterGroup ignite::cluster::ClusterGroup::ForHost | ( | std::string | hostName | ) |
Get cluster group consisting from the nodes running on the host specified.
hostName | Host name. |
ClusterGroup ignite::cluster::ClusterGroup::ForHosts | ( | std::vector< std::string > | hostNames | ) |
Get cluster group consisting from the nodes running on the hosts specified.
hostNames | Container of host names. |
ClusterGroup ignite::cluster::ClusterGroup::ForNode | ( | ClusterNode | node | ) |
Get cluster group for the given node.
node | Cluster node. |
ClusterGroup ignite::cluster::ClusterGroup::ForNodeId | ( | Guid | id | ) |
Get cluster group for a node with the specified ID.
id | Cluster node ID. |
ClusterGroup ignite::cluster::ClusterGroup::ForNodeIds | ( | std::vector< Guid > | ids | ) |
Get cluster group over nodes with specified node IDs.
ids | Cluster node IDs. |
ClusterGroup ignite::cluster::ClusterGroup::ForNodes | ( | std::vector< ClusterNode > | nodes | ) |
Get cluster group over a given set of nodes.
nodes | Cluster nodes. |
ClusterGroup ignite::cluster::ClusterGroup::ForOldest | ( | ) |
Get cluster group with one oldest node from the current cluster group.
ClusterGroup ignite::cluster::ClusterGroup::ForPredicate | ( | IgnitePredicate< ClusterNode > * | pred | ) |
Create a new cluster group which includes all nodes that pass the given predicate filter.
pred | Pointer to predicate heap object. User should NOT free the memory used by object. |
IgniteError | if there are no nodes in the cluster group. |
ClusterGroup ignite::cluster::ClusterGroup::ForRandom | ( | ) |
Get cluster group with one random node from the current cluster group.
ClusterGroup ignite::cluster::ClusterGroup::ForRemotes | ( | ) |
Get cluster group consisting from the nodes in this cluster group excluding the local node.
ClusterGroup ignite::cluster::ClusterGroup::ForServers | ( | ) |
Creates a cluster group of nodes started in server mode.
ClusterGroup ignite::cluster::ClusterGroup::ForYoungest | ( | ) |
Get cluster group with one youngest node in the current cluster group.
ClusterNode ignite::cluster::ClusterGroup::GetNode | ( | ) |
Get first node from the list of nodes in this cluster group.
IgniteError | if there are no nodes in the cluster group. |
ClusterNode ignite::cluster::ClusterGroup::GetNode | ( | Guid | nid | ) |
Get node for given ID from this cluster group.
nid | Cluster node ID. |
IgniteError | if there is no node with specified ID. |
std::vector< ClusterNode > ignite::cluster::ClusterGroup::GetNodes | ( | ) |
Get the vector of nodes in this cluster group.
IgnitePredicate< ClusterNode > * ignite::cluster::ClusterGroup::GetPredicate | ( | ) |
Get predicate that defines a subset of nodes for this cluster group.