Skip to content

Commit

Permalink
feat(s3stream): make AbstractOrderedCollection could be extented by o…
Browse files Browse the repository at this point in the history
…thers (#863)

Signed-off-by: Robin Han <[email protected]>
  • Loading branch information
superhx authored Dec 28, 2023
1 parent 0f5121a commit 18ff310
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<guava.version>32.1.3-jre</guava.version>
<slf4j.version>2.0.9</slf4j.version>
<snakeyaml.version>2.2</snakeyaml.version>
<s3stream.version>0.8.0-SNAPSHOT</s3stream.version>
<s3stream.version>0.9.0-SNAPSHOT</s3stream.version>

<!-- Flat buffers related -->
<flatbuffers.version>23.5.26</flatbuffers.version>
Expand Down
2 changes: 1 addition & 1 deletion s3stream/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.automq.elasticstream</groupId>
<artifactId>s3stream</artifactId>
<version>0.8.0-SNAPSHOT</version>
<version>0.9.0-SNAPSHOT</version>
<properties>
<mockito-core.version>5.5.0</mockito-core.version>
<junit-jupiter.version>5.10.0</junit-jupiter.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

public abstract class AbstractOrderedCollection<T> {

abstract int size();
protected abstract int size();

abstract ComparableItem<T> get(int index);
protected abstract ComparableItem<T> get(int index);

public int search(T target) {
int low = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ public IndexBlockOrderedBytes(ByteBuf byteBuf) {
}

@Override
int size() {
protected int size() {
return this.byteBuf.readableBytes() / ComparableStreamRange.SIZE;
}

@Override
ComparableItem<TargetStreamOffset> get(int index) {
protected ComparableItem<TargetStreamOffset> get(int index) {
int start = index * ComparableStreamRange.SIZE;
long streamId = this.byteBuf.getLong(start);
long startOffset = this.byteBuf.getLong(start + 8);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public int size() {
}

@Override
ComparableItem<Long> get(int index) {
protected ComparableItem<Long> get(int index) {
return records.get(index);
}

Expand Down

0 comments on commit 18ff310

Please sign in to comment.