ReadWriteTable (samza-api 1.9.0-SNAPSHOT API) JavaScript is disabled on your browser. Skip navigation links Overview Package Class Tree Deprecated Index Help Prev Class Next Class Frames No Frames All Classes Summary:  Nested |  Field |  Constr |  Method Detail:  Field |  Constr |  Method org.apache.samza.table Interface ReadWriteTable<K,V> Type Parameters: K - the type of the key in this table V - the type of the value in this table All Superinterfaces: AsyncReadWriteUpdateTable<K,V,java.lang.Void>, ReadWriteUpdateTable<K,V,java.lang.Void>, Table @InterfaceStability.Unstable public interface ReadWriteTable<K,V> extends ReadWriteUpdateTable<K,V,java.lang.Void> A table that supports synchronous and asynchronous get, put and delete by one or more keys Method Summary All Methods Instance Methods Abstract Methods Default Methods  Modifier and Type Method and Description void delete(K key, java.lang.Object... args) Deletes the mapping for the specified key from this table (if such mapping exists). void deleteAll(java.util.List<K> keys, java.lang.Object... args) Deletes the mappings for the specified keys from this table. V get(K key, java.lang.Object... args) Gets the value associated with the specified key. java.util.Map<K,V> getAll(java.util.List<K> keys, java.lang.Object... args) Gets the values with which the specified keys are associated. void put(K key, V value, java.lang.Object... args) Updates the mapping of the specified key-value pair; Associates the specified key with the specified value. void putAll(java.util.List<Entry<K,V>> entries, java.lang.Object... args) Updates the mappings of the specified key-value entries. default <T> T read(int opId, java.lang.Object... args) Executes a read operation. default void update(K key, java.lang.Void update) Updates the record associated with a given key with the specified update. default void updateAll(java.util.List<Entry<K,java.lang.Void>> updates) Updates the mappings of the given keys with the corresponding updates. default <T> T write(int opId, java.lang.Object... args) Executes a write operation. Methods inherited from interface org.apache.samza.table.AsyncReadWriteUpdateTable close, deleteAllAsync, deleteAsync, flush, getAllAsync, getAsync, init, putAllAsync, putAsync, readAsync, updateAllAsync, updateAsync, writeAsync Method Detail get V get(K key, java.lang.Object... args) Gets the value associated with the specified key. Specified by: get in interface ReadWriteUpdateTable<K,V,java.lang.Void> Parameters: key - the key with which the associated value is to be fetched. args - additional arguments Returns: if found, the value associated with the specified key; otherwise, null. Throws: java.lang.NullPointerException - if the specified key is null. getAll java.util.Map<K,V> getAll(java.util.List<K> keys, java.lang.Object... args) Gets the values with which the specified keys are associated. Specified by: getAll in interface ReadWriteUpdateTable<K,V,java.lang.Void> Parameters: keys - the keys with which the associated values are to be fetched. args - additional arguments Returns: a map of the keys that were found and their respective values. Throws: java.lang.NullPointerException - if the specified keys list, or any of the keys, is null. read default <T> T read(int opId, java.lang.Object... args) Executes a read operation. opId is used to allow tracking of different types of operation. Specified by: read in interface ReadWriteUpdateTable<K,V,java.lang.Void> Type Parameters: T - return type Parameters: opId - operation identifier args - additional arguments Returns: read result update default void update(K key, java.lang.Void update) Updates the record associated with a given key with the specified update. Specified by: update in interface ReadWriteUpdateTable<K,V,java.lang.Void> Parameters: key - the key with which the specified value is to be associated. update - the update to be applied to the record specified by key. Throws: java.lang.NullPointerException - if the specified key is null. updateAll default void updateAll(java.util.List<Entry<K,java.lang.Void>> updates) Updates the mappings of the given keys with the corresponding updates. Specified by: updateAll in interface ReadWriteUpdateTable<K,V,java.lang.Void> Parameters: updates - the updates for the given keys Throws: java.lang.NullPointerException - if any of the specified entries has null as key. put void put(K key, V value, java.lang.Object... args) Updates the mapping of the specified key-value pair; Associates the specified key with the specified value. The key is deleted from the table if value is null. Specified by: put in interface ReadWriteUpdateTable<K,V,java.lang.Void> Parameters: key - the key with which the specified value is to be associated. value - the value with which the specified key is to be associated. args - additional arguments Throws: java.lang.NullPointerException - if the specified key is null. putAll void putAll(java.util.List<Entry<K,V>> entries, java.lang.Object... args) Updates the mappings of the specified key-value entries. A key is deleted from the table if its corresponding value is null. Specified by: putAll in interface ReadWriteUpdateTable<K,V,java.lang.Void> Parameters: entries - the updated mappings to put into this table. args - additional arguments Throws: java.lang.NullPointerException - if any of the specified entries has null as key. delete void delete(K key, java.lang.Object... args) Deletes the mapping for the specified key from this table (if such mapping exists). Specified by: delete in interface ReadWriteUpdateTable<K,V,java.lang.Void> Parameters: key - the key for which the mapping is to be deleted. args - additional arguments Throws: java.lang.NullPointerException - if the specified key is null. deleteAll void deleteAll(java.util.List<K> keys, java.lang.Object... args) Deletes the mappings for the specified keys from this table. Specified by: deleteAll in interface ReadWriteUpdateTable<K,V,java.lang.Void> Parameters: keys - the keys for which the mappings are to be deleted. args - additional arguments Throws: java.lang.NullPointerException - if the specified keys list, or any of the keys, is null. write default <T> T write(int opId, java.lang.Object... args) Executes a write operation. opId is used to allow tracking of different types of operation. Specified by: write in interface ReadWriteUpdateTable<K,V,java.lang.Void> Type Parameters: T - return type Parameters: opId - operation identifier args - additional arguments Returns: write result Skip navigation links Overview Package Class Tree Deprecated Index Help Prev Class Next Class Frames No Frames All Classes Summary:  Nested |  Field |  Constr |  Method Detail:  Field |  Constr |  Method