Chunk.EmptyChunk<K,V>| Constructor and Description |
|---|
Chunk.EmptyChunk() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventFactory(DeleteEventFactory deleteEventFactory)
Add an DeleteEventFactory to use when generating insert events.
|
void |
addEventFactory(InsertEventFactory insertEventFactory)
Add an InsertEventFactory to use when generating insert events.
|
void |
addEventFactory(QueryEventFactory queryEventFactory)
Add an QueryEventFactory to use when generating insert events.
|
void |
addEventFactory(UpdateEventFactory updateEventFactory)
Add an UpdateEventFactory to use when generating insert events.
|
void |
close() |
int |
delete(K key,
DeleteEventFactory<K>... customEventFactory)
Delete a key from this Chunk, returning the number of values deleted.
|
K |
insert(V value,
InsertEventFactory<K,V>... customEventFactory)
Insert a value into this Chunk, returning the key at which the get can be retrieved later.
|
QueryResult<V> |
query(K key,
QueryEventFactory<K,V>... customEventFactory)
Query a key at this Chunk, returning a QueryResult contianing the queried values.
|
void |
setEventDispatcher(EventDispatcher eventDispatcher)
Set the EventDispatcher on this Chunk.
|
int |
update(K key,
V value,
UpdateEventFactory<K,V>... customEventFactory)
Update a key with a value at this Chunk, returning the number of values updated.
|
public K insert(V value, InsertEventFactory<K,V>... customEventFactory) throws InsertException
Chunkinsert in interface Chunk<K,V>value - the value to insertcustomEventFactory - optional InsertEventFactories used to generate events for this operation.InsertExceptionpublic QueryResult<V> query(K key, QueryEventFactory<K,V>... customEventFactory) throws QueryException
Chunkquery in interface Chunk<K,V>key - the key to querycustomEventFactory - optional QueryEventFactories used to generate events for this operation.QueryExceptionpublic int update(K key, V value, UpdateEventFactory<K,V>... customEventFactory) throws UpdateException
Chunkupdate in interface Chunk<K,V>key - the key to updatevalue - the value to updatecustomEventFactory - optional UpdateEventFactories used to generate events for this operation.UpdateExceptionpublic int delete(K key, DeleteEventFactory<K>... customEventFactory) throws DeleteException
Chunkdelete in interface Chunk<K,V>key - the key to deletecustomEventFactory - optional DeleteEventFactories used to generate events for this operation.DeleteExceptionpublic void setEventDispatcher(EventDispatcher eventDispatcher)
ChunkOperations on this Chunk will dispatch events to the given EventDispatcher. The events dispatched are generated by EventFactories that are either previously added to this Chunk, or else passed in as a parameter to the Chunk operation.
setEventDispatcher in interface Chunk<K,V>eventDispatcher - The EventDispatcher to be used for events on this Chunk.public void addEventFactory(InsertEventFactory insertEventFactory)
ChunkaddEventFactory in interface Chunk<K,V>public void addEventFactory(QueryEventFactory queryEventFactory)
ChunkaddEventFactory in interface Chunk<K,V>public void addEventFactory(UpdateEventFactory updateEventFactory)
ChunkaddEventFactory in interface Chunk<K,V>public void addEventFactory(DeleteEventFactory deleteEventFactory)
ChunkaddEventFactory in interface Chunk<K,V>public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException