There is no concept of master/slave in clustering in WildFly. Maybe you mean something else?
In JGroups there is a concept of "coordinator" which you can find out using clustering API, see org.wildfly.clustering.group.Group#isCoordinator.
In Infinispan, there is concept of "primary" and backup owner which pertains to each key, not node.
Domain management-wise there is a domain controller (master) from which nodes fetch their configuration.