All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.neoremind.fountain.Defaults Maven / Gradle / Ivy

package net.neoremind.fountain;

import net.neoremind.fountain.changedata.ChangeDataSet;
import net.neoremind.fountain.eventposition.DisposeEventPositionBridge;

/**
 * 默认值
 *
 * @author zhangxu
 */
class Defaults {

    /**
     * producer的名称
     */
    final static String DEFAULT_PRODUCER_NAME = "binglog-sync-producer";

    /**
     * producer和consumer之间的缓存队列长度
     */
    final static int MESSAGE_QUEUE_SIZE = 20000;

    /**
     * 默认的消费者实现,仅打印到控制台
     */
    final static EventConsumer CONSUMER = new EventConsumer() {

        @Override
        public void onEvent(ChangeDataSet changeDataSet) {
            System.out.println(changeDataSet);
        }

        @Override
        public void onSuccess(ChangeDataSet changeDataSet, DisposeEventPositionBridge positionBridge) {

        }

        @Override
        public void onFail(ChangeDataSet changeDataSet, Throwable t) {

        }
    };

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy