@Override public <V> K configureIfNotNull(ConfigKey<V> key, V val) { super.configureIfNotNull(key, val); return self(); }
/** * Creates a new {@link EnricherSpec} instance with the given config, for an enricher of the given type. * * This is primarily for groovy code; equivalent to {@code EnricherSpec.create(type).configure(config)}. * * @param config The spec's configuration (see {@link EnricherSpec#configure(Map)}). * @param type An {@link Enricher} class */ public static <T extends Enricher> EnricherSpec<T> create(Map<?,?> config, Class<T> type) { return EnricherSpec.create(type).configure(config); }
@Override protected String getDefaultUniqueTag() { if (publishing==null) return null; return "combiner:"+publishing.getName(); } @Override
@Override public void onEvent(SensorEvent<Lifecycle> event) { synchronized (events) { events[0] = events[1]; events[1] = event.getValue(); } }
@Override public Entity call() { return enricher.getConfig(TestEnricher.TARGET_ENTITY_FROM_FLAG); }}).get(); Assert.assertEquals(targetFromFlag, target);
@Override protected void checkValidType(Class<? extends T> type) { checkIsImplementation(type, Enricher.class); checkIsNewStyleImplementation(type); }
/** * Creates a new {@link EnricherSpec} instance for an enricher of the given type. The returned * {@link EnricherSpec} can then be customized. * * @param type A {@link Enricher} class */ public static <T extends Enricher> EnricherSpec<T> create(Class<? extends T> type) { return new EnricherSpec<T>(type); }
private int countActive(List<Feed> knownFeeds) { int activeCount=0; for (Feed f: knownFeeds) { if (f.isRunning()) activeCount++; } return activeCount; }
@Override public Entity call() throws Exception { return enricher.getConfig(key); } }).get();
@Override public String toString() { return "attributeSatisfies("+attribute.getName()+","+condition+")"; } }
@Override protected String getDefaultUniqueTag() { if (publishing==null) return null; return "aggregator:"+publishing.getName(); } @Override