public class DefaultStreamManager extends Object implements StreamManager
StreamManager for use in tests| Constructor and Description |
|---|
DefaultStreamManager(co.cask.cdap.data.stream.service.StreamHandler streamHandler,
co.cask.cdap.data.stream.service.StreamFetchHandler streamFetchHandler,
co.cask.cdap.proto.Id.Stream streamId) |
| Modifier and Type | Method and Description |
|---|---|
void |
createStream() |
protected void |
finalize() |
List<StreamEvent> |
getEvents(long startTime,
long endTime,
int limit) |
List<StreamEvent> |
getEvents(String startTime,
String endTime,
int limit) |
void |
send(byte[] content) |
void |
send(byte[] content,
int off,
int len) |
void |
send(ByteBuffer buffer) |
void |
send(File file,
String contentType) |
void |
send(Map<String,String> headers,
byte[] content) |
void |
send(Map<String,String> headers,
byte[] content,
int off,
int len) |
void |
send(Map<String,String> headers,
ByteBuffer buffer) |
void |
send(Map<String,String> headers,
String content) |
void |
send(String content) |
@Inject
public DefaultStreamManager(co.cask.cdap.data.stream.service.StreamHandler streamHandler,
co.cask.cdap.data.stream.service.StreamFetchHandler streamFetchHandler,
co.cask.cdap.proto.Id.Stream streamId)
public void createStream()
throws IOException
createStream in interface StreamManagerIOExceptionpublic void send(String content) throws IOException
send in interface StreamManagerIOExceptionpublic void send(byte[] content)
throws IOException
send in interface StreamManagerIOExceptionpublic void send(byte[] content,
int off,
int len)
throws IOException
send in interface StreamManagerIOExceptionpublic void send(ByteBuffer buffer) throws IOException
send in interface StreamManagerIOExceptionpublic void send(Map<String,String> headers, String content) throws IOException
send in interface StreamManagerIOExceptionpublic void send(Map<String,String> headers, byte[] content) throws IOException
send in interface StreamManagerIOExceptionpublic void send(Map<String,String> headers, byte[] content, int off, int len) throws IOException
send in interface StreamManagerIOExceptionpublic void send(Map<String,String> headers, ByteBuffer buffer) throws IOException
send in interface StreamManagerIOExceptionpublic void send(File file, String contentType) throws Exception
send in interface StreamManagerExceptionprotected void finalize()
throws Throwable
public List<StreamEvent> getEvents(String startTime, String endTime, int limit) throws IOException
getEvents in interface StreamManagerIOExceptionpublic List<StreamEvent> getEvents(long startTime, long endTime, int limit) throws IOException
getEvents in interface StreamManagerIOExceptionCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.