com.amazonaws.services.kinesis.producer.IKinesisProducer Maven / Gradle / Ivy
package com.amazonaws.services.kinesis.producer;
import java.nio.ByteBuffer;
import java.util.List;
import java.util.concurrent.ExecutionException;
import com.google.common.util.concurrent.ListenableFuture;
import com.amazonaws.services.schemaregistry.common.Schema;
public interface IKinesisProducer {
ListenableFuture addUserRecord(String stream, String partitionKey, ByteBuffer data);
ListenableFuture addUserRecord(UserRecord userRecord);
ListenableFuture addUserRecord(String stream, String partitionKey, String explicitHashKey, ByteBuffer data);
ListenableFuture addUserRecord(String stream, String partitionKey, String explicitHashKey, ByteBuffer data, Schema schema);
int getOutstandingRecordsCount();
default long getOldestRecordTimeInMillis() {
throw new UnsupportedOperationException("This method is not supported in this IKinesisProducer type");
}
List getMetrics(String metricName, int windowSeconds) throws InterruptedException, ExecutionException;
List getMetrics(String metricName) throws InterruptedException, ExecutionException;
List getMetrics() throws InterruptedException, ExecutionException;
List getMetrics(int windowSeconds) throws InterruptedException, ExecutionException;
void destroy();
void flush(String stream);
void flush();
void flushSync();
}