ClusterConnection extends the Connection class for cluster applications. Use this class to participate in cluster communication, manage node attachment, inspect cluster status, and control scatter/gather operations.
public class ClusterConnection : Connection
{
// ===== CONSTRUCTOR =====
public ClusterConnection(Database db);
// ===== CLUSTER LIFECYCLE METHODS =====
public void Listen();
public void Barrier();
public void Detach();
public void Stop();
// ===== CLUSTER INFORMATION METHODS =====
public Database.ClusterInfo GetInfo();
public Database.ClusterNodeInfo[] GetActiveNodes();
// ===== WINDOW CONFIGURATION METHODS =====
public void SetWindowParams(Database.ClusterWindow WindowParam);
public Database.ClusterWindow GetWindowParams();
// ===== DATA DISTRIBUTION METHODS =====
public bool Scatter(Type[] classes, int[] nodeIds);
public bool Scatter(Type[] classes);
public bool Scatter();
public bool Gather(Type[] classes, int[] nodeIds);
public bool Gather(Type[] classes);
public bool Gather();
// ===== CLUSTER ATTACHMENT =====
public void Attach(Database.ClusterParams clusterParams);
}
Database.Mode.ClusterSupport and configured with Database.ClusterParams. Use this connection to manage node participation in the eXtremeDB cluster.Barrier(). This is useful for coordinating cluster-wide phases of work.Stop(). Use Detach() when a graceful cluster leave is required.Database.ClusterInfo, including counters such as bytes sent/received, active node count, and this node's identifier.Database.ClusterNodeInfo values such as node address, quorum rank, and node ID.Database.ClusterWindow.classes selects which classes to process, and nodeIds selects the destination nodes.Scatter().Database.ClusterParams configuration, including node, network, and window settings.Database.Mode.ClusterSupport. In the C# implementation, cluster mode also uses MVCC transaction management, and node/network settings are supplied through Database.ClusterParams.Listen() on a dedicated thread, perform cluster work through another ClusterConnection, call Stop() when shutting down, and then wait for the listener thread to exit.Database.ClusterWindow includes Length, BSize, and Timeout. These values control the cluster replication window used by this node.Scatter() and Gather() operate on distributed classes and internally translate managed Type values to class identifiers from the current database dictionary.Database.ClusterParams and related structures.Scatter() to distribute work or distributed object changes across nodes, and Gather() to collect them back when consolidation or cross-node processing is required.Barrier() provides a synchronization point across cluster nodes. Combine it with GetInfo() when coordinating critical cluster operations.Detach() when appropriate, call Stop(), wait for listener activity to end, and then disconnect and close the database.ClusterConnection instances are not thread-safe. Use one instance per thread, and coordinate cluster management actions externally to avoid conflicting topology changes.Scatter() and Gather() return false on failure. When diagnosing cluster issues, inspect GetInfo(), node notifications, and runtime logs.Attach() and SetWindowParams() affect the current runtime session. Persisted cluster behavior may also depend on the lower-level cluster configuration used to open the database.Stop(), wait for the listener thread to finish, inspect GetInfo(), and then disconnect and close the database.