use of org.openkilda.wfm.share.model.Endpoint in project open-kilda by telstra.
the class DecisionMakerHandler method makeDefaultTuple.
// Private
private Values makeDefaultTuple(PortCommand command) {
Endpoint endpoint = command.getEndpoint();
CommandContext context = forkContext("DM", endpoint.toString());
return new Values(endpoint.getDatapath(), endpoint.getPortNumber(), command, context);
}
use of org.openkilda.wfm.share.model.Endpoint in project open-kilda by telstra.
the class NetworkWatchListService method tick.
/**
* Consume timer tick.
*/
@VisibleForTesting
void tick(long tickTime) {
SortedMap<Long, Set<Endpoint>> range = timeouts.subMap(0L, tickTime + 1);
if (!range.isEmpty()) {
Map<Endpoint, WatchListEntry> renew = new HashMap<>();
for (Set<Endpoint> endpointSet : range.values()) {
for (Endpoint endpoint : endpointSet) {
WatchListEntry watchListEntry = endpoints.get(endpoint);
if (watchListEntry != null && renew.put(endpoint, watchListEntry) == null) {
carrier.discoveryRequest(endpoint, tickTime);
}
}
}
range.clear();
renew.forEach((endpoint, watchListEntry) -> addTimeout(endpoint, tickTime + calculateTimeout(endpoint)));
}
}
use of org.openkilda.wfm.share.model.Endpoint in project open-kilda by telstra.
the class NetworkWatchListService method activate.
/**
* Handles topology activation event.
*/
public void activate() {
long currentTime = now();
for (Endpoint entry : endpoints.keySet()) {
carrier.discoveryRequest(entry, currentTime);
addTimeout(entry, currentTime + genericTickPeriod);
}
}
use of org.openkilda.wfm.share.model.Endpoint in project open-kilda by telstra.
the class SwitchHandler method makePortTuple.
private Values makePortTuple(PortCommand command) {
Endpoint endpoint = command.getEndpoint();
CommandContext context = forkContext(endpoint.toString());
return new Values(endpoint.getDatapath(), endpoint.getPortNumber(), command, context);
}
use of org.openkilda.wfm.share.model.Endpoint in project open-kilda by telstra.
the class CacheService method updateCache.
private Endpoint updateCache(Endpoint source) throws IslNotFoundException, IllegalIslStateException {
Isl isl = getNotMovedIsl(source);
Endpoint destination = Endpoint.of(isl.getDestSwitchId(), isl.getDestPort());
cache.put(source, destination);
cache.put(destination, source);
return destination;
}
Aggregations