class ReplicatedEnvironmentFacade implements EnvironmentFacade, StateChangeListener {

    public void removeNodeFromGroup(final String nodeName)
    {
        try
        {
            createReplicationGroupAdmin().removeMember(nodeName);
        }
        catch (MasterStateException e)
        {
            throw new IllegalStateTransitionException(String.format("Node '%s' cannot be deleted when role is a master",
                                                                    nodeName));
        }
        catch (MemberNotFoundException e)
        {
            throw new IllegalArgumentException(String.format("Node '%s' is not a member of the group", nodeName), e);
        }
        catch (RuntimeException e)
        {
            throw handleDatabaseException("Exception on node removal from group", e);
        }
    }

    public  ReplicatedEnvironmentFacade(ReplicatedEnvironmentConfiguration configuration);

}