This sample demonstrates the use of synchronous and asynchronous events in a cluster environment. It creates a cluster database, registers synchronous and asynchronous event handlers, then performs
_new()
,_update()
and_delete()
operations. (Note that thedelete
event handler can return a code other than MCO_S_OK, so the delete operation can be rejected, and that a handler for each event is called on all the cluster nodes so the operation is completed successfully only if all handlers on all nodes return MCO_S_OK).
In a console window run:
cluster_events 2 0Then in a second console window run:
cluster_events 2 1But it is more instructive to run one instance in your development environment debugger, stepping through the code.