/** * <p> * The scaling type. Uniform scaling creates shards of equal size. * </p> * * @param scalingType * The scaling type. Uniform scaling creates shards of equal size. * @see ScalingType */ public void setScalingType(ScalingType scalingType) { withScalingType(scalingType); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStreamName() == null) ? 0 : getStreamName().hashCode()); hashCode = prime * hashCode + ((getTargetShardCount() == null) ? 0 : getTargetShardCount().hashCode()); hashCode = prime * hashCode + ((getScalingType() == null) ? 0 : getScalingType().hashCode()); return hashCode; }
LOG.info(String.format("Updating Stream %s Shard Count to %s", streamName, targetShardCount)); UpdateShardCountRequest req = new UpdateShardCountRequest() .withScalingType(ScalingType.UNIFORM_SCALING).withStreamName(streamName) .withTargetShardCount(targetShardCount); this.kinesisClient.updateShardCount(req);
UpdateShardCountRequest updateShardCountRequest = new UpdateShardCountRequest() .withStreamName(streamName) .withTargetShardCount(targetCount) .withScalingType(ScalingType.UNIFORM_SCALING);
UpdateShardCountRequest updateShardCountRequest = new UpdateShardCountRequest() .withStreamName(streamName) .withTargetShardCount(targetCount) .withScalingType(ScalingType.UNIFORM_SCALING);
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateShardCountRequest == false) return false; UpdateShardCountRequest other = (UpdateShardCountRequest) obj; if (other.getStreamName() == null ^ this.getStreamName() == null) return false; if (other.getStreamName() != null && other.getStreamName().equals(this.getStreamName()) == false) return false; if (other.getTargetShardCount() == null ^ this.getTargetShardCount() == null) return false; if (other.getTargetShardCount() != null && other.getTargetShardCount().equals(this.getTargetShardCount()) == false) return false; if (other.getScalingType() == null ^ this.getScalingType() == null) return false; if (other.getScalingType() != null && other.getScalingType().equals(this.getScalingType()) == false) return false; return true; }
/** * <p> * The scaling type. Uniform scaling creates shards of equal size. * </p> * * @param scalingType * The scaling type. Uniform scaling creates shards of equal size. * @see ScalingType */ public void setScalingType(ScalingType scalingType) { withScalingType(scalingType); }
UpdateShardCountRequest updateShardCountRequest = new UpdateShardCountRequest() .withStreamName(streamName).withTargetShardCount(targetCount) .withScalingType(ScalingType.UNIFORM_SCALING);
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getStreamName() != null) sb.append("StreamName: ").append(getStreamName()).append(","); if (getTargetShardCount() != null) sb.append("TargetShardCount: ").append(getTargetShardCount()).append(","); if (getScalingType() != null) sb.append("ScalingType: ").append(getScalingType()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(UpdateShardCountRequest updateShardCountRequest, ProtocolMarshaller protocolMarshaller) { if (updateShardCountRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(updateShardCountRequest.getStreamName(), STREAMNAME_BINDING); protocolMarshaller.marshall(updateShardCountRequest.getTargetShardCount(), TARGETSHARDCOUNT_BINDING); protocolMarshaller.marshall(updateShardCountRequest.getScalingType(), SCALINGTYPE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStreamName() == null) ? 0 : getStreamName().hashCode()); hashCode = prime * hashCode + ((getTargetShardCount() == null) ? 0 : getTargetShardCount().hashCode()); hashCode = prime * hashCode + ((getScalingType() == null) ? 0 : getScalingType().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateShardCountRequest == false) return false; UpdateShardCountRequest other = (UpdateShardCountRequest) obj; if (other.getStreamName() == null ^ this.getStreamName() == null) return false; if (other.getStreamName() != null && other.getStreamName().equals(this.getStreamName()) == false) return false; if (other.getTargetShardCount() == null ^ this.getTargetShardCount() == null) return false; if (other.getTargetShardCount() != null && other.getTargetShardCount().equals(this.getTargetShardCount()) == false) return false; if (other.getScalingType() == null ^ this.getScalingType() == null) return false; if (other.getScalingType() != null && other.getScalingType().equals(this.getScalingType()) == false) return false; return true; } }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getStreamName() != null) sb.append("StreamName: " + getStreamName() + ","); if (getTargetShardCount() != null) sb.append("TargetShardCount: " + getTargetShardCount() + ","); if (getScalingType() != null) sb.append("ScalingType: " + getScalingType()); sb.append("}"); return sb.toString(); }
jsonWriter.beginObject(); if (updateShardCountRequest.getStreamName() != null) { String streamName = updateShardCountRequest.getStreamName(); jsonWriter.name("StreamName"); jsonWriter.value(streamName); if (updateShardCountRequest.getTargetShardCount() != null) { Integer targetShardCount = updateShardCountRequest.getTargetShardCount(); jsonWriter.name("TargetShardCount"); jsonWriter.value(targetShardCount); if (updateShardCountRequest.getScalingType() != null) { String scalingType = updateShardCountRequest.getScalingType(); jsonWriter.name("ScalingType"); jsonWriter.value(scalingType);
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStreamName() == null) ? 0 : getStreamName().hashCode()); hashCode = prime * hashCode + ((getTargetShardCount() == null) ? 0 : getTargetShardCount().hashCode()); hashCode = prime * hashCode + ((getScalingType() == null) ? 0 : getScalingType().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateShardCountRequest == false) return false; UpdateShardCountRequest other = (UpdateShardCountRequest) obj; if (other.getStreamName() == null ^ this.getStreamName() == null) return false; if (other.getStreamName() != null && other.getStreamName().equals(this.getStreamName()) == false) return false; if (other.getTargetShardCount() == null ^ this.getTargetShardCount() == null) return false; if (other.getTargetShardCount() != null && other.getTargetShardCount().equals(this.getTargetShardCount()) == false) return false; if (other.getScalingType() == null ^ this.getScalingType() == null) return false; if (other.getScalingType() != null && other.getScalingType().equals(this.getScalingType()) == false) return false; return true; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getStreamName() != null) sb.append("StreamName: ").append(getStreamName()).append(","); if (getTargetShardCount() != null) sb.append("TargetShardCount: ").append(getTargetShardCount()).append(","); if (getScalingType() != null) sb.append("ScalingType: ").append(getScalingType()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(UpdateShardCountRequest updateShardCountRequest, ProtocolMarshaller protocolMarshaller) { if (updateShardCountRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(updateShardCountRequest.getStreamName(), STREAMNAME_BINDING); protocolMarshaller.marshall(updateShardCountRequest.getTargetShardCount(), TARGETSHARDCOUNT_BINDING); protocolMarshaller.marshall(updateShardCountRequest.getScalingType(), SCALINGTYPE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }