public final class BufferedContentWriterFactory extends Object implements ContentWriterFactory
ContentWriterFactory that creates ContentWriter that buffer all write requests in memory
and write them out at close time.| Constructor and Description |
|---|
BufferedContentWriterFactory(Id.Stream streamId,
ConcurrentStreamWriter streamWriter,
Map<String,String> headers) |
| Modifier and Type | Method and Description |
|---|---|
ContentWriter |
create(Map<String,String> headers)
Creates a
ContentWriter with the given set of event headers added to each StreamEvent
written through the ContentWriter returned. |
Id.Stream |
getStream()
Returns the Id of the stream that all
ContentWriter created by this factory will write to. |
public BufferedContentWriterFactory(Id.Stream streamId, ConcurrentStreamWriter streamWriter, Map<String,String> headers)
public Id.Stream getStream()
ContentWriterFactoryContentWriter created by this factory will write to.getStream in interface ContentWriterFactorypublic ContentWriter create(Map<String,String> headers) throws IOException
ContentWriterFactoryContentWriter with the given set of event headers added to each StreamEvent
written through the ContentWriter returned.create in interface ContentWriterFactoryIOExceptionCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.