@Component(value="component-cassandra-dao") public class ComponentCassandraDao extends CassandraDao
Modifier and Type | Field and Description |
---|---|
static Integer |
DEFAULT_FETCH_SIZE |
client, manager, session
Constructor and Description |
---|
ComponentCassandraDao() |
Modifier and Type | Method and Description |
---|---|
CassandraOperationStatus |
deleteComponent(String id) |
fj.data.Either<List<ComponentCacheData>,ActionStatus> |
getAllComponentIdTimeAndType() |
fj.data.Either<ComponentCacheData,ActionStatus> |
getComponent(String id) |
fj.data.Either<List<ComponentCacheData>,ActionStatus> |
getComponents(List<String> ids) |
fj.data.Either<org.apache.commons.lang3.tuple.ImmutablePair<List<ComponentCacheData>,Set<String>>,ActionStatus> |
getComponents(Map<String,Long> idToTimestampMap) |
void |
init() |
fj.data.Either<Boolean,CassandraOperationStatus> |
isTableEmpty(String tableName)
the method checks if the given table is empty in the artifact keyspace
|
CassandraOperationStatus |
saveComponent(ComponentCacheData componentCacheData) |
public static Integer DEFAULT_FETCH_SIZE
@PostConstruct public void init()
public fj.data.Either<List<ComponentCacheData>,ActionStatus> getComponents(List<String> ids)
ids
- - list of components unique idpublic fj.data.Either<List<ComponentCacheData>,ActionStatus> getAllComponentIdTimeAndType()
public fj.data.Either<ComponentCacheData,ActionStatus> getComponent(String id)
id
- - component unique idpublic CassandraOperationStatus saveComponent(ComponentCacheData componentCacheData)
public fj.data.Either<Boolean,CassandraOperationStatus> isTableEmpty(String tableName)
isTableEmpty
in class CassandraDao
tableName
- the name of the table we want to checkpublic fj.data.Either<org.apache.commons.lang3.tuple.ImmutablePair<List<ComponentCacheData>,Set<String>>,ActionStatus> getComponents(Map<String,Long> idToTimestampMap)
idToTimestampMap
- - list of components unique idpublic CassandraOperationStatus deleteComponent(String id)
Copyright © 2017. All rights reserved.