Skip to content

Commit

Permalink
Remove regular Committer
Browse files Browse the repository at this point in the history
  • Loading branch information
pnv1 committed Oct 26, 2023
1 parent 227588b commit 17724d0
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 55 deletions.
21 changes: 0 additions & 21 deletions topic/src/main/java/tech/ydb/topic/read/Committer.java

This file was deleted.

9 changes: 0 additions & 9 deletions topic/src/main/java/tech/ydb/topic/read/Message.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,4 @@ public interface Message {
*/
CompletableFuture<Void> commit();

/**
* Returns a Committer object to call commit() on later.
* This object has no data references and therefore may be useful in cases where commit() is called after
* processing data in an external system
*
* @return a Committer object
*/
Committer getCommitter();

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.util.List;
import java.util.concurrent.CompletableFuture;

import tech.ydb.topic.read.Committer;
import tech.ydb.topic.read.Message;
import tech.ydb.topic.read.PartitionSession;

Expand Down Expand Up @@ -37,13 +36,4 @@ public interface DataReceivedEvent {
*/
CompletableFuture<Void> commit();

/**
* Returns a Committer object to call commit() on later.
* This object has no data references and therefore may be useful in cases where commit() is called after
* processing data in an external system
*
* @return a Committer object
*/
Committer getCommitter();

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import tech.ydb.topic.read.Committer;
import tech.ydb.topic.read.OffsetsRange;

/**
* @author Nikolay Perfilov
*/
public class CommitterImpl implements Committer {
public class CommitterImpl {
private static final Logger logger = LoggerFactory.getLogger(CommitterImpl.class);
private final PartitionSessionImpl partitionSession;
private final int messageCount;
Expand All @@ -23,7 +22,7 @@ public CommitterImpl(PartitionSessionImpl partitionSession, int messageCount, Of
this.offsetsToCommit = offsetsToCommit;
}

@Override

public CompletableFuture<Void> commit() {
return commitImpl(true);
}
Expand Down
6 changes: 0 additions & 6 deletions topic/src/main/java/tech/ydb/topic/read/impl/MessageImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import java.util.Map;
import java.util.concurrent.CompletableFuture;

import tech.ydb.topic.read.Committer;
import tech.ydb.topic.read.DecompressionException;
import tech.ydb.topic.read.Message;
import tech.ydb.topic.read.OffsetsRange;
Expand Down Expand Up @@ -119,11 +118,6 @@ public OffsetsRange getOffsetsToCommit() {
return offsetsToCommit;
}

@Override
public Committer getCommitter() {
return committer;
}

/**
* BUILDER
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.util.List;
import java.util.concurrent.CompletableFuture;

import tech.ydb.topic.read.Committer;
import tech.ydb.topic.read.Message;
import tech.ydb.topic.read.OffsetsRange;
import tech.ydb.topic.read.PartitionSession;
Expand Down Expand Up @@ -50,9 +49,4 @@ public CompletableFuture<Void> commit() {
public OffsetsRange getOffsetsToCommit() {
return offsetsToCommit;
}

@Override
public Committer getCommitter() {
return committer;
}
}

0 comments on commit 17724d0

Please sign in to comment.