class HighAvailabilityModeSwitcher implements HighAvailabilityMemberListener, BindingListener, Lifecycle {

    @Override
    public void masterIsAvailable( HighAvailabilityMemberChangeEvent event )
    {
        if ( event.getNewState() == event.getOldState() && event.getOldState() == HighAvailabilityMemberState.SLAVE )
        {
            clusterMemberAvailability.memberIsAvailable( SLAVE, slaveHaURI, storeIdSupplier.get() );
        }
        else
        {
            stateChanged( event );
        }
    }

    public  HighAvailabilityModeSwitcher( SwitchToSlave switchToSlave,
                                         SwitchToMaster switchToMaster,
                                         Election election,
                                         ClusterMemberAvailability clusterMemberAvailability,
                                         ClusterClient clusterClient,
                                         Supplier<StoreId> storeIdSupplier,
                                         InstanceId instanceId,
                                         ComponentSwitcher componentSwitcher,
                                         DataSourceManager neoStoreDataSourceSupplier,
                                         LogService logService );

}