public interface BlockStore
| Modifier and Type | Interface and Description |
|---|---|
static interface |
BlockStore.Factory |
| Modifier and Type | Method and Description |
|---|---|
void |
attach(BlockPayload block)
Adds a new block to this store.
|
void |
clear()
Discards all blocks from this store.
|
void |
close()
Closes this store.
|
void |
flush()
Flushes any pending updates for this store.
|
void |
open(Runnable initAction,
BlockStore.Factory factory)
Opens this store, calling the given action if the store is empty.
|
<T extends BlockPayload> |
read(BlockPointer pos,
Class<T> payloadType)
Reads a block from this store.
|
<T extends BlockPayload> |
readFirst(Class<T> payloadType)
Reads the first block from this store.
|
void |
remove(BlockPayload block)
Removes the given block from this store.
|
void |
write(BlockPayload block)
Writes a block to this store, adding the block if required.
|
void open(Runnable initAction, BlockStore.Factory factory)
void close()
void clear()
void remove(BlockPayload block)
<T extends BlockPayload> T readFirst(Class<T> payloadType)
<T extends BlockPayload> T read(BlockPointer pos, Class<T> payloadType)
void write(BlockPayload block)
void attach(BlockPayload block)
write(BlockPayload) is called.void flush()
Copyright © 2013. All rights reserved