Reference Guide
Table Of Contents
- 1 Introduction
- 2 Establishing Your Test and Development Environments
- 3 Developing Applications
- Introduction
- Authentication
- REST API
- Audit Logging
- Alert Logging
- Configuration
- High Availability
- OpenFlow
- Metrics Framework
- GUI
- SKI Framework - Overview
- SKI Framework - Navigation Tree
- SKI Framework - Hash Navigation
- SKI Framework - View Life-Cycle
- SKI Framework - Live Reference Application
- UI Extension
- Introduction
- Controller Teaming
- Distributed Coordination Service
- Persistence
- Backup and Restore
- Device Driver Framework
- 4 Application Security
- 5 Including Debian Packages with Applications
- 6 Sample Application
- Application Description
- Creating Application Development Workspace
- Application Generator (Automatic Workspace Creation)
- Creating Eclipse Projects
- Updating Project Dependencies
- Building the Application
- Installing the Application
- Application Code
- 7 Testing Applications
- 8 Built-In Applications
- Appendix A
- Appendix B
- Bibliography
@Override
public CassandraStorable<String, StateComposite>
execute()
throws Exception {
return context.getContext()
.get(AlertsByState.COL_FAMILY,
AlertsByState.ROW_KEY, range,
AlertsByState.STATE_DECODER);
}
};
// Start the transaction
context.getTransactionContext()
.prepareTransaction(AlertsByState.COL_FAMILY.getName(),
AlertsByState.ROW_KEY);
CassandraStorable<String, StateComposite> rows = context
.getTransactionContext().executeCriticalSection(procedure);
// Add the rows to the row set
Collection<String> id = new ArrayList<String>();
for (Column<StateComposite, ?> state : rows.getColumns()) {
id.add(state.getName().getValue().getId());
}
// Add row Id's to the final Id set
if (rowsSet.isEmpty()) {
rowsSet.addAll(id);
} else {
rowsSet.retainAll(id);
}
}
return rowsSet;
}
findPagedRows()
Same as the previous one but takes paging into account.
CassandraAlertDao.java:
@Override
protected <M> MarkPage<String> findPagedRows(CassandraAlertFilter filter,
SortSpecification<CassandraAlertSortAttribute> sort,
final MarkPageRequest<M> pageRequest,
final DataStoreContext context) {
if (filter == null) {
if (pageRequest == null) {
throw new RuntimeException("Page request cannot be null");
109