public class SimpleEscape extends Object implements Escape
Modifier and Type | Field and Description |
---|---|
static byte |
COMMIT |
static byte |
DATA |
static byte |
DROP |
static byte |
NEW |
Constructor and Description |
---|
SimpleEscape(String filename,
boolean append)
Creates a new instance of SimpleEscape
|
Modifier and Type | Method and Description |
---|---|
void |
commit(long handle)
The previous blocks saved by
Escape.save(long, java.lang.String, java.lang.String, java.nio.ByteBuffer) method should be commited. |
void |
drop(long handle)
The previous blocks saved by
Escape.save(long, java.lang.String, java.lang.String, java.nio.ByteBuffer) method should be forgotten. |
long |
save(long handle,
ByteBuffer buf)
Save the consequent buffer related to a stream of the key.
|
long |
save(long id,
String key,
String contentType,
ByteBuffer buf)
Save the very first buffer related to a stream of the key.
|
void |
shutdown()
Closes (shuts down) this interface.
|
public static final byte COMMIT
public static final byte DROP
public static final byte DATA
public static final byte NEW
public SimpleEscape(String filename, boolean append) throws IOException
IOException
public long save(long id, String key, String contentType, ByteBuffer buf) throws IOException
Escape
save
in interface Escape
IOException
public long save(long handle, ByteBuffer buf) throws IOException
Escape
save
in interface Escape
IOException
public void drop(long handle) throws IOException
Escape
Escape.save(long, java.lang.String, java.lang.String, java.nio.ByteBuffer)
method should be forgotten.drop
in interface Escape
IOException
public void commit(long handle) throws IOException
Escape
Escape.save(long, java.lang.String, java.lang.String, java.nio.ByteBuffer)
method should be commited.commit
in interface Escape
IOException
Copyright © 2016 Egothor. All Rights Reserved.