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

com.aliyun.openservices.ots.internal.writer.RowChangeEvent Maven / Gradle / Ivy

Go to download

Aliyun Open Services SDK for Java Copyright (C) Alibaba Cloud Computing All rights reserved. 版权所有 (C)阿里云计算有限公司 http://www.aliyun.com

There is a newer version: 2.2.4
Show newest version
package com.aliyun.openservices.ots.internal.writer;

import com.aliyun.openservices.ots.model.RowChange;
import com.lmax.disruptor.EventFactory;

import java.util.concurrent.CountDownLatch;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;

public class RowChangeEvent {
    public static enum EventType {
        DATA, FLUSH
    }

    public EventType type;
    public RowChange rowChange;
    public CountDownLatch latch;

    private RowChangeEvent() {

    }

    public void setValue(RowChange rowChange) {
        this.type = EventType.DATA;
        this.rowChange = rowChange;
    }

    public void setValue(CountDownLatch latch) {
        this.type = EventType.FLUSH;
        this.latch = latch;
    }

    public static class RowChangeEventFactory implements EventFactory {
        @Override
        public RowChangeEvent newInstance() {
            return new RowChangeEvent();
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy