Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(s3stream): make AbstractOrderedCollection could be extented by others #863

Merged
merged 1 commit into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading