SDN Controller Programming Guide

67
try {
teamingService.joinTeam(APP_ID, this);
} catch (Exception e) {
...
}
}
@Deactivate
public void deactivate() {
try {
teamingService.leaveTeam(APP_ID, this);
} catch (Exception e) {
...
}
...
}
@Override
public void processTeamEvent(TeamEvent event,
Id<SystemInformation, UUID> instanceId) {
// Process the message in a separate thread context.
...
}
private void teamingOperationsExample() {
// Query for the healthy members of the team
Collection<String> members = teamingService.getHealthyMembers();
// Trigger re-election with-in the team
teamingService.runElection();
}
}
HA Service
HA service provides the building blocks to achieve high availability in the HP VAN SDN Controller
environment. This module runs as OSGI service in the Virgo container. Interested applications need
to reference HA osgi service. An example java application that makes use of different
functionalities of the HA service is described in the subsequent sections.
HA Service is one-stop shop for SDN applications integrating with in memory HA primitives.
Through this service applications can make use of the following HA infrastructure blocks:
Distributed Bus
Distributed KeyStore
Distributed Locking