Example usage for com.amazonaws.services.kinesis.model PutRecordRequest getStreamName

List of usage examples for com.amazonaws.services.kinesis.model PutRecordRequest getStreamName

Introduction

In this page you can find the example usage for com.amazonaws.services.kinesis.model PutRecordRequest getStreamName.

Prototype


public String getStreamName() 

Source Link

Document

The name of the stream to put the data record into.

Usage

From source file:com.facebook.presto.kinesis.util.MockKinesisClient.java

License:Apache License

@Override
public PutRecordResult putRecord(PutRecordRequest putRecordRequest)
        throws AmazonServiceException, AmazonClientException {
    // Setup method to add a new record:
    InternalStream theStream = this.getStream(putRecordRequest.getStreamName());
    if (theStream != null) {
        PutRecordResult result = theStream.putRecord(putRecordRequest.getData(),
                putRecordRequest.getPartitionKey());
        return result;
    } else {//  www .  j  a v  a2 s.c o  m
        throw new AmazonClientException("This stream does not exist!");
    }
}