internal SplitShardResponse SplitShard(SplitShardRequest request) { var marshaller = new SplitShardRequestMarshaller(); var unmarshaller = SplitShardResponseUnmarshaller.Instance; return(Invoke <SplitShardRequest, SplitShardResponse>(request, marshaller, unmarshaller)); }
/// <summary> /// Initiates the asynchronous execution of the SplitShard operation. /// <seealso cref="Amazon.Kinesis.IAmazonKinesis.SplitShard"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the SplitShard operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> public Task <SplitShardResponse> SplitShardAsync(SplitShardRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new SplitShardRequestMarshaller(); var unmarshaller = SplitShardResponseUnmarshaller.GetInstance(); return(Invoke <IRequest, SplitShardRequest, SplitShardResponse>(request, marshaller, unmarshaller, signer, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the SplitShard operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the SplitShard operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> public Task <SplitShardResponse> SplitShardAsync(SplitShardRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new SplitShardRequestMarshaller(); var unmarshaller = SplitShardResponseUnmarshaller.Instance; return(InvokeAsync <SplitShardRequest, SplitShardResponse>(request, marshaller, unmarshaller, cancellationToken)); }
public void SplitShardMarshallTest() { var request = InstantiateClassGenerator.Execute <SplitShardRequest>(); var marshaller = new SplitShardRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <SplitShardRequest>(request, jsonRequest); }
/// <summary> /// Initiates the asynchronous execution of the SplitShard operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the SplitShard operation on AmazonKinesisClient.</param> /// <param name="callback">An Action delegate that is invoked when the operation completes.</param> /// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.</param> public void SplitShardAsync(SplitShardRequest request, AmazonServiceCallback <SplitShardRequest, SplitShardResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new SplitShardRequestMarshaller(); var unmarshaller = SplitShardResponseUnmarshaller.Instance; Action <AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if (callback != null) { callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult <SplitShardRequest, SplitShardResponse> responseObject = new AmazonServiceResult <SplitShardRequest, SplitShardResponse>((SplitShardRequest)req, (SplitShardResponse)res, ex, ao.State); callback(responseObject); } } ; BeginInvoke <SplitShardRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
/// <summary> /// <para>This operation splits a shard into two new shards in the stream, to increase the stream's capacity to ingest and transport data. /// <c>SplitShard</c> is called when there is a need to increase the overall capacity of stream because of an expected increase in the volume of /// data records being ingested. </para> <para> <c>SplitShard</c> can also be used when a given shard appears to be approaching its maximum /// utilization, for example, when the set of producers sending data into the specific shard are suddenly sending more than previously /// anticipated. You can also call the <c>SplitShard</c> operation to increase stream capacity, so that more Amazon Kinesis applications can /// simultaneously read data from the stream for real-time processing. </para> <para>The <c>SplitShard</c> operation requires that you specify /// the shard to be split and the new hash key, which is the position in the shard where the shard gets split in two. In many cases, the new /// hash key might simply be the average of the beginning and ending hash key, but it can be any hash key value in the range being mapped into /// the shard. For more information about splitting shards, see the <a href="http://docs.aws.amazon.com/kinesis/latest/dev/">Amazon Kinesis /// Developer Guide</a> . /// </para> <para>You can use the DescribeStream operation to determine the shard ID and hash key values for the <c>ShardToSplit</c> /// and <c>NewStartingHashKey</c> parameters that are specified in the <c>SplitShard</c> request.</para> <para> <c>SplitShard</c> is an /// asynchronous operation. Upon receiving a <c>SplitShard</c> request, Amazon Kinesis immediately returns a response and sets the stream status /// to UPDATING. After the operation is completed, Amazon Kinesis sets the stream status to ACTIVE. Read and write operations continue to work /// while the stream is in the UPDATING state. </para> <para>You can use <c>DescribeStream</c> to check the status of the stream, which is /// returned in <c>StreamStatus</c> . /// If the stream is in the ACTIVE state, you can call <c>SplitShard</c> . /// If a stream is in CREATING or UPDATING or DELETING states, then Amazon Kinesis returns a <c>ResourceInUseException</c> .</para> /// <para>If the specified stream does not exist, Amazon Kinesis returns a <c>ResourceNotFoundException</c> . /// If you try to create more shards than are authorized for your account, you receive a <c>LimitExceededException</c> . /// </para> <para> <b>Note:</b> The default limit for an AWS account is two shards per stream. If you need to create a stream with more than two /// shards, contact AWS Support to increase the limit on your account.</para> <para>If you try to operate on too many streams in parallel using /// CreateStream, DeleteStream, MergeShards or SplitShard, you will receive a <c>LimitExceededException</c> . </para> <para> <c>SplitShard</c> /// has limit of 5 transactions per second per account.</para> /// </summary> /// /// <param name="splitShardRequest">Container for the necessary parameters to execute the SplitShard service method on AmazonKinesis.</param> /// /// <exception cref="T:Amazon.Kinesis.Model.LimitExceededException" /> /// <exception cref="T:Amazon.Kinesis.Model.ResourceInUseException" /> /// <exception cref="T:Amazon.Kinesis.Model.InvalidArgumentException" /> /// <exception cref="T:Amazon.Kinesis.Model.ResourceNotFoundException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<SplitShardResponse> SplitShardAsync(SplitShardRequest splitShardRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new SplitShardRequestMarshaller(); var unmarshaller = SplitShardResponseUnmarshaller.GetInstance(); return Invoke<IRequest, SplitShardRequest, SplitShardResponse>(splitShardRequest, marshaller, unmarshaller, signer, cancellationToken); }
public void SplitShardMarshallTest() { var request = InstantiateClassGenerator.Execute<SplitShardRequest>(); var marshaller = new SplitShardRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson<SplitShardRequest>(request,jsonRequest); }
/// <summary> /// Initiates the asynchronous execution of the SplitShard operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the SplitShard operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> public Task<SplitShardResponse> SplitShardAsync(SplitShardRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new SplitShardRequestMarshaller(); var unmarshaller = SplitShardResponseUnmarshaller.Instance; return InvokeAsync<SplitShardRequest,SplitShardResponse>(request, marshaller, unmarshaller, cancellationToken); }
internal SplitShardResponse SplitShard(SplitShardRequest request) { var marshaller = new SplitShardRequestMarshaller(); var unmarshaller = SplitShardResponseUnmarshaller.Instance; return Invoke<SplitShardRequest,SplitShardResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the SplitShard operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the SplitShard operation on AmazonKinesisClient.</param> /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param> /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.</param> /// /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndSplitShard /// operation.</returns> public IAsyncResult BeginSplitShard(SplitShardRequest request, AsyncCallback callback, object state) { var marshaller = new SplitShardRequestMarshaller(); var unmarshaller = SplitShardResponseUnmarshaller.Instance; return BeginInvoke<SplitShardRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Initiates the asynchronous execution of the SplitShard operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the SplitShard operation on AmazonKinesisClient.</param> /// <param name="callback">An Action delegate that is invoked when the operation completes.</param> /// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.</param> public void SplitShardAsync(SplitShardRequest request, AmazonServiceCallback<SplitShardRequest, SplitShardResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new SplitShardRequestMarshaller(); var unmarshaller = SplitShardResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<SplitShardRequest,SplitShardResponse> responseObject = new AmazonServiceResult<SplitShardRequest,SplitShardResponse>((SplitShardRequest)req, (SplitShardResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<SplitShardRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
IAsyncResult invokeSplitShard(SplitShardRequest splitShardRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new SplitShardRequestMarshaller().Marshall(splitShardRequest); var unmarshaller = SplitShardResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }