use of org.onosproject.store.service.StorageService in project onos by opennetworkinglab.
the class DistributedDhcpRelayStore method activated.
@Activate
protected void activated() {
dhcpRecords = storageService.<HostId, DhcpRecord>eventuallyConsistentMapBuilder().withName("DHCP-Relay-Records").withTimestampProvider((hostId, record) -> {
if (record != null) {
return new WallClockTimestamp(record.lastSeen());
} else {
return new WallClockTimestamp();
}
}).withSerializer(APP_KRYO).build();
listener = new InternalMapListener();
dhcpRecords.addListener(listener);
}
Aggregations