use of org.apache.ignite.internal.util.typedef.P2 in project ignite by apache.
the class GridCommunicationManagerListenersSelfTest method testOneListener.
/**
* This is the workaround- as long as we keep a message listener in
* the stack, our FIFO bug isn't exposed. Comment above out to see.
*/
@SuppressWarnings({ "deprecation" })
public void testOneListener() {
Ignite ignite = G.ignite(getTestIgniteInstanceName());
final AtomicBoolean stop = new AtomicBoolean();
P2<UUID, Object> l = new P2<UUID, Object>() {
@Override
public boolean apply(UUID uuid, Object o) {
return stop.get();
}
};
try {
ignite.message().localListen(null, l);
checkLoop(2000);
} finally {
stop.set(true);
}
}
Aggregations