
com.aliyun.openservices.ots.internal.writer.RowChangeEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ots-public Show documentation
Show all versions of ots-public Show documentation
Aliyun Open Services SDK for Java Copyright (C) Alibaba Cloud Computing All rights reserved. 版权所有 (C)阿里云计算有限公司 http://www.aliyun.com
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