"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "modules/dcache-frontend/src/main/java/org/dcache/restful/events/streams/metronome/Metronome.java" between
dcache-6.0.14-src.tar.gz and dcache-6.0.15-src.tar.gz

About: dCache provides a system for storing and retrieving huge amounts of data, distributed among a large number of heterogenous server nodes, under a single virtual filesystem tree with a variety of standard access methods. Free usage only for academic and non-profit organizations. Fature release. Source code.

Metronome.java  (dcache-6.0.14-src):Metronome.java  (dcache-6.0.15-src)
skipping to change at line 41 skipping to change at line 41
import java.io.IOException; import java.io.IOException;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.function.BiConsumer; import java.util.function.BiConsumer;
import org.dcache.restful.events.spi.EventStream; import org.dcache.restful.events.spi.EventStream;
import org.dcache.restful.events.spi.SelectionContext;
import static org.dcache.restful.util.transfers.Json.readFromJar; import static org.dcache.restful.util.transfers.Json.readFromJar;
import org.dcache.restful.events.spi.SelectionResult; import org.dcache.restful.events.spi.SelectionResult;
/** /**
* A plugin that emits a configurable stream of string messages. The time * A plugin that emits a configurable stream of string messages. The time
* between successive messages may be specified as a frequency (in Hz) or as * between successive messages may be specified as a frequency (in Hz) or as
* a delay (in seconds). It is also possible to introduce some randomness in * a delay (in seconds). It is also possible to introduce some randomness in
* the delay. * the delay.
skipping to change at line 107 skipping to change at line 108
return SELECTORS_SCHEMA; return SELECTORS_SCHEMA;
} }
@Override @Override
public ObjectNode eventSchema() public ObjectNode eventSchema()
{ {
return EVENTS_SCHEMA; return EVENTS_SCHEMA;
} }
@Override @Override
public SelectionResult select(String channelId, BiConsumer<String,JsonNode> public SelectionResult select(SelectionContext context,
receiver, BiConsumer<String,JsonNode> receiver, JsonNode serialisedSelector)
JsonNode serialisedSelector)
{ {
Selector selector = deserialise(serialisedSelector); Selector selector = deserialise(serialisedSelector);
SelectionResult result = selector.validationError(); SelectionResult result = selector.validationError();
if (result != null) { if (result != null) {
return result; return result;
} }
Selection selection = new Selection(receiver, service, selector); Selection selection = new Selection(receiver, service, selector);
selectionById.put(selection.getId(), selection); selectionById.put(selection.getId(), selection);
LOGGER.debug("Created new selection {}", selection); LOGGER.debug("Created new selection {}", selection);
return SelectionResult.created(selection); return SelectionResult.created(selection);
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)