close/1 | Signals the stream to close. |
flush/1 | Causes the stream to immediately flush its buffers and commit any pending writes to the file. |
ping/1 | Pings the stream, resetting the TTL timer. |
send/2 | Sends the given binary to the stream for writing. |
start/4 | |
start_link/4 | Starts a stream for writing at the specified offset. |
status/2 | Gets the current filehandle on which the stream is operating. |
close(X1) -> any()
Signals the stream to close. The stream will immediately flush its buffers to the file and will stay open for TTL milliseconds waiting for one last status/2 call.
flush(X1) -> any()
Causes the stream to immediately flush its buffers and commit any pending writes to the file. Equivalent to an fsync call in most other filesystem API's.
ping(X1) -> any()
Pings the stream, resetting the TTL timer. Use this if you have a slow writer but don't necessarily want to extend the TTL time.
send(X1, Data) -> any()
Sends the given binary to the stream for writing. The put stream does its own internal buffering for performance reasons, so this is equivalent to writing to a regular file on a local filesystem. If you want guarantees that your write is actually written then you need to call flush/1 on the put stream.
start(Riak, File, Offset, TTL) -> any()
start_link(Riak::riak(), File::luwak_file(), Offset::int(), TTL::int()) -> put_stream()
Equivalent to start(Riak, File, Offset, TTL).
Starts a stream for writing at the specified offset. The stream will remain open for TTL milliseconds. Every time the stream is written to or pinged it will reset the TTL counter. Therefore slow writers should set an appropriate TTL or use ping/1 to keep a stream open. This function links the stream process to the calling process.
status(Stream::put_stream(), Timeout) -> {ok, File} | {error, Reason}
Gets the current filehandle on which the stream is operating. Can be called at any time during the life of a stream, including after a call to close/1. The returned file is not guaranteed to reflect the latest calls to send/2, since status/2 does not cause a flush to occur.
Generated by EDoc, May 31 2010, 11:13:39.