private class LookupDiscovery.DecodeAnnouncementTask extends Object implements TaskManager.Task
Modifier and Type | Field and Description |
---|---|
private DatagramPacket |
datagram |
Constructor and Description |
---|
LookupDiscovery.DecodeAnnouncementTask(DatagramPacket datagram)
Creates a task for decoding the given multicast announcement packet.
|
Modifier and Type | Method and Description |
---|---|
private void |
doRun()
Decodes this task's multicast announcement packet.
|
private boolean |
newSeqNum(long currentNum,
long oldNum)
Returns
true if currentNum is a new sequence number
that needs to be inspected. |
void |
run()
Restore the privileged context and run
|
boolean |
runAfter(List tasks,
int size)
No ordering
|
private final DatagramPacket datagram
public LookupDiscovery.DecodeAnnouncementTask(DatagramPacket datagram)
public void run()
private void doRun()
private boolean newSeqNum(long currentNum, long oldNum)
true
if currentNum is a new sequence number
that needs to be inspected. A -1 occurs if the announcement had no
sequence number (for e.g. DiscoveryV1) or the service had been
discovered through unicast discovery. REMIND: Ideally the
message should have a flag which indicates no sequence number instead
of overloading the -1 valuepublic boolean runAfter(List tasks, int size)
runAfter
in interface TaskManager.Task
tasks
- the tasks to consider. A read-only List, with all
elements instanceof Task.size
- elements with index less than size should be consideredCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.