Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ public ApiKeys apiKey() {

public abstract int throttleTimeMs();

public abstract void setThrottleTimeMs(int throttleTimeMs);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about maybeSetThrottleTimeMs since not all response schemas support it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Will change.


public String toString() {
return data().toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

@Override
public AddOffsetsToTxnResponseData data() {
return data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

public Map<TopicPartition, Errors> errors() {
if (cachedErrorsMap != null) {
return cachedErrorsMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

public Errors error() {
return Errors.forCode(data.errorCode());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

@Override
public Map<Errors, Integer> errorCounts() {
Map<Errors, Integer> counts = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

@Override
public AlterConfigsResponseData data() {
return data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

@Override
public Map<Errors, Integer> errorCounts() {
Map<Errors, Integer> counts = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

public static AlterPartitionResponse parse(ByteBuffer buffer, short version) {
return new AlterPartitionResponse(new AlterPartitionResponseData(new ByteBufferAccessor(buffer), version));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

@Override
public Map<Errors, Integer> errorCounts() {
Map<Errors, Integer> errorCounts = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

@Override
public Map<Errors, Integer> errorCounts() {
return errorCounts(data.results().stream().map(r -> Errors.forCode(r.errorCode())));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ public int throttleTimeMs() {
return this.data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

@Override
public boolean shouldClientThrottle(short version) {
return version >= 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ public int throttleTimeMs() {
return DEFAULT_THROTTLE_TIME;
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
// Not supported by the response schema
}

public static BeginQuorumEpochResponse parse(ByteBuffer buffer, short version) {
return new BeginQuorumEpochResponse(new BeginQuorumEpochResponseData(new ByteBufferAccessor(buffer), version));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

@Override
public Map<Errors, Integer> errorCounts() {
Map<Errors, Integer> errorCounts = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

@Override
public Map<Errors, Integer> errorCounts() {
Map<Errors, Integer> errorCounts = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ public int throttleTimeMs() {
return DEFAULT_THROTTLE_TIME;
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
// Not supported by the response schema
}

public static ControlledShutdownResponse parse(ByteBuffer buffer, short version) {
return new ControlledShutdownResponse(new ControlledShutdownResponseData(new ByteBufferAccessor(buffer), version));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

public List<CreateAclsResponseData.AclCreationResult> results() {
return data.results();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

public Errors error() {
return Errors.forCode(data.errorCode());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,9 @@ public boolean shouldClientThrottle(short version) {
public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

@Override
public Map<Errors, Integer> errorCounts() {
HashMap<Errors, Integer> counts = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

public List<DeleteAclsResponseData.DeleteAclsFilterResult> filterResults() {
return data.filterResults();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

@Override
public boolean shouldClientThrottle(short version) {
return version >= 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

@Override
public Map<Errors, Integer> errorCounts() {
Map<Errors, Integer> errorCounts = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

@Override
public DeleteTopicsResponseData data() {
return data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

public ApiError error() {
return new ApiError(Errors.forCode(data.errorCode()), data.errorMessage());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

@Override
public DescribeClientQuotasResponseData data() {
return data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

@Override
public DescribeClusterResponseData data() {
return data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

@Override
public Map<Errors, Integer> errorCounts() {
Map<Errors, Integer> errorCounts = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

public Errors error() {
return Errors.forCode(data.errorCode());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

public static final String UNKNOWN_STATE = "";
public static final String UNKNOWN_PROTOCOL_TYPE = "";
public static final String UNKNOWN_PROTOCOL = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

@Override
public Map<Errors, Integer> errorCounts() {
Map<Errors, Integer> errorCounts = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,9 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ public int throttleTimeMs() {
return DEFAULT_THROTTLE_TIME;
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
// Not supported by the response schema
}

public static DescribeQuorumResponseData singletonErrorResponse(
TopicPartition topicPartition,
Errors error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,10 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

}

Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ public int throttleTimeMs() {
return data.throttleTimeMs();
}

@Override
public void setThrottleTimeMs(int throttleTimeMs) {
data.setThrottleTimeMs(throttleTimeMs);
}

@Override
public Map<Errors, Integer> errorCounts() {
return errorCounts(data.results().stream().map(r -> Errors.forCode(r.errorCode())));
Expand Down
Loading