public class RedisSparseMatrixState<T> extends AbstractRedisState<T> implements SparseMatrixState<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
RedisSparseMatrixState.Factory<T> |
protected static class |
RedisSparseMatrixState.RedisSparseVector<T> |
SparseMatrixState.SparseVector<T>config, id, pool, serializer| Constructor and Description |
|---|
RedisSparseMatrixState(String id) |
RedisSparseMatrixState(String id,
RedisConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
beginCommit(Long txid) |
void |
commit(Long txid) |
T |
get(long i,
long j)
Gets a specific value inside the matrix.
|
SparseMatrixState.SparseVector<T> |
getColumn(long i)
Gets a specific column as a
SparseMatrixState.SparseVector. |
protected String |
getColumnKey(long i) |
SparseMatrixState.SparseVector<T> |
getRow(long j)
Gets a specific row as a
SparseMatrixState.SparseVector. |
protected String |
getRowKey(long j) |
void |
set(long i,
long j,
T value)
Sets a specific value inside the matrix.
|
protected void |
set(String key,
long index,
T value) |
flushAll, generateKey, generateKey, generateKeypublic RedisSparseMatrixState(String id)
public RedisSparseMatrixState(String id, RedisConfig config)
public T get(long i, long j)
SparseMatrixStateget in interface SparseMatrixState<T>i - row indexj - column indexnull if no value was foundpublic void set(long i,
long j,
T value)
SparseMatrixStateset in interface SparseMatrixState<T>i - row indexj - column indexvalue - the new valuepublic SparseMatrixState.SparseVector<T> getColumn(long i)
SparseMatrixStateSparseMatrixState.SparseVector.getColumn in interface SparseMatrixState<T>i - column indexpublic SparseMatrixState.SparseVector<T> getRow(long j)
SparseMatrixStateSparseMatrixState.SparseVector.getRow in interface SparseMatrixState<T>j - row indexprotected String getColumnKey(long i)
protected String getRowKey(long j)
public void beginCommit(Long txid)
beginCommit in interface storm.trident.state.Statepublic void commit(Long txid)
commit in interface storm.trident.state.StateCopyright © 2013. All rights reserved.