Package com.alibaba.otter.common.push.supplier

Examples of com.alibaba.otter.common.push.supplier.DatasourceChangeCallback


            return;
        }
        if (dataSourceSupplier == null) {
            dataSourceSupplier = MediaDatasourceSupplier.newInstance(dbGroupKey);
            dataSourceSupplier.start();
            dataSourceSupplier.addSwtichCallback(new DatasourceChangeCallback() {

                public void masterChanged(DatasourceInfo newMaster) {
                    String newUrl = buildMysqlUrl(newMaster.getAddress().getAddress().getHostAddress(),
                                                  newMaster.getAddress().getPort());
                    try {
View Full Code Here


            return;
        }
        if (dataSourceSupplier == null) {
            dataSourceSupplier = MediaDatasourceSupplier.newInstance(dbGroupKey);
            dataSourceSupplier.start();
            dataSourceSupplier.addSwtichCallback(new DatasourceChangeCallback() {

                public void masterChanged(DatasourceInfo newMaster) {
                    String newUrl = buildMysqlUrl(newMaster.getAddress().getAddress().getHostAddress(),
                                                  newMaster.getAddress().getPort());
                    try {
View Full Code Here

        this.availableAuthenticationInfo = customInfoIfNecessay(masterFetched);

        log.info(String.format("medialHAController customed for goup:[%s], and first auth info is : [%s]", this.group,
                               this.availableAuthenticationInfo));

        this.supplier.addSwtichCallback(new DatasourceChangeCallback() {

            @Override
            public void masterChanged(DatasourceInfo newMaster) {
                AuthenticationInfo newAuthenticationInfo = AuthenticationInfoUtils.createFrom(newMaster);
                switchEventSource(newAuthenticationInfo);
View Full Code Here

TOP

Related Classes of com.alibaba.otter.common.push.supplier.DatasourceChangeCallback

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.