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
private static ColumnFamilyDefinition<String, String> CF_DEF =
new ColumnFamilyDefinition<String, String>(
COL_FAMILY, BasicType.UTF8, BasicType.BYTES,
BasicType.UTF8, null, cfMeta);
private static final EnumColumnDecoder<String, Severity> SEV_DECODER
= new EnumColumnDecoder<String, Severity>(Severity.class);
private AlertColumnFamily() {
}
public static int compareColumns(
CassandraStorable<String, String> row1,
CassandraStorable<String, String> row2,
CassandraAlertSortAttribute sortBy) {
int retVal = 0;
switch (sortBy) {
case ORIGIN:
StringColumn<String> col1 =
(StringColumn) row1.getColumn(ORIGIN_COL_NAME);
StringColumn<String> col2 =
(StringColumn) row2.getColumn(ORIGIN_COL_NAME);
retVal = col1.compareTo(col2);
break;
case TIMESTAMP:
DateColumn<String> time1 =
(DateColumn) row1.getColumn(TIMESTAMP_COL_NAME);
DateColumn<String> time2 =
(DateColumn) row2.getColumn(TIMESTAMP_COL_NAME);
retVal = time1.compareTo(time2);
break;
case SEVERITY:
EnumColumn<String, Severity> sev1 =
(EnumColumn) row1.getColumn(SEVERITY_COL_NAME);
EnumColumn<String, Severity> sev2 =
(EnumColumn) row2.getColumn(SEVERITY_COL_NAME);
retVal = sev1.compareTo(sev2);
break;
case STATE:
BooleanColumn<String> state1 =
(BooleanColumn) row1.getColumn(STATE_COL_NAME);
BooleanColumn<String> state2 =
(BooleanColumn) row2.getColumn(STATE_COL_NAME);
retVal = state1.compareTo(state2);
break;
96