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

Remove Serializable from BlobReadChannel and BlobWriteChannel #261

Merged
merged 7 commits into from
Oct 19, 2015
Prev Previous commit
Next Next commit
Remove public modifiers from channels StateImpl Builder
  • Loading branch information
mziccard committed Oct 19, 2015
commit dcbe37fab40c070d58155fdaa8b8fee673a40582
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static class StateImpl implements RestorableState<BlobReadChannel>, Serializable
this.chunkSize = builder.chunkSize;
}

public static class Builder {
static class Builder {
private final StorageOptions serviceOptions;
private final BlobId blob;
private final Map<StorageRpc.Option, ?> requestOptions;
Expand All @@ -182,32 +182,32 @@ private Builder(StorageOptions options, BlobId blob, Map<StorageRpc.Option, ?> r
this.requestOptions = reqOptions;
}

public Builder position(int position) {
Builder position(int position) {
this.position = position;
return this;
}

public Builder isOpen(boolean isOpen) {
Builder isOpen(boolean isOpen) {
this.isOpen = isOpen;
return this;
}

public Builder endOfStream(boolean endOfStream) {
Builder endOfStream(boolean endOfStream) {
this.endOfStream = endOfStream;
return this;
}

public Builder chunkSize(int chunkSize) {
Builder chunkSize(int chunkSize) {
this.chunkSize = chunkSize;
return this;
}

public RestorableState<BlobReadChannel> build() {
RestorableState<BlobReadChannel> build() {
return new StateImpl(this);
}
}

public static Builder builder(
static Builder builder(
StorageOptions options, BlobId blob, Map<StorageRpc.Option, ?> reqOptions) {
return new Builder(options, blob, reqOptions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ static class StateImpl implements RestorableState<BlobWriteChannel>, Serializabl
this.chunkSize = builder.chunkSize;
}

public static class Builder {
static class Builder {
private final StorageOptions serviceOptions;
private final BlobInfo blobInfo;
private final String uploadId;
Expand All @@ -196,37 +196,37 @@ private Builder(StorageOptions options, BlobInfo blobInfo, String uploadId) {
this.uploadId = uploadId;
}

public Builder position(int position) {
Builder position(int position) {
this.position = position;
return this;
}

public Builder buffer(byte[] buffer) {
Builder buffer(byte[] buffer) {
this.buffer = buffer.clone();
return this;
}

public Builder limit(int limit) {
Builder limit(int limit) {
this.limit = limit;
return this;
}

public Builder isOpen(boolean isOpen) {
Builder isOpen(boolean isOpen) {
this.isOpen = isOpen;
return this;
}

public Builder chunkSize(int chunkSize) {
Builder chunkSize(int chunkSize) {
this.chunkSize = chunkSize;
return this;
}

public RestorableState<BlobWriteChannel> build() {
RestorableState<BlobWriteChannel> build() {
return new StateImpl(this);
}
}

public static Builder builder(StorageOptions options, BlobInfo blobInfo, String uploadId) {
static Builder builder(StorageOptions options, BlobInfo blobInfo, String uploadId) {
return new Builder(options, blobInfo, uploadId);
}

Expand Down