@Test public void testNotify() throws InitializationException, IOException { runner.setProperty(Notify.RELEASE_SIGNAL_IDENTIFIER, "${releaseSignalAttribute}"); runner.setProperty(Notify.ATTRIBUTE_CACHE_REGEX, ".*"); final Map<String, String> props = new HashMap<>(); props.put("releaseSignalAttribute", "1"); props.put("key", "value"); runner.enqueue(new byte[] {},props); runner.run(); runner.assertAllFlowFilesTransferred(Notify.REL_SUCCESS, 1); runner.clearTransferState(); final Signal signal = new WaitNotifyProtocol(service).getSignal("1"); Map<String, String> cachedAttributes = signal.getAttributes(); assertEquals("value", cachedAttributes.get("key")); assertTrue(signal.isTotalCountReached(1)); }
public Notify() { final Set<Relationship> rels = new HashSet<>(); rels.add(REL_SUCCESS); rels.add(REL_FAILURE); relationships = Collections.unmodifiableSet(rels); }
Notify extends AbstractProcessor { public Notify() { final Set<Relationship> rels = new HashSet<>(); rels.add(REL_SUCCESS); rels.add(REL_FAILURE); relationships = Collections.unmodifiableSet(rels); } }
Notify extends AbstractProcessor { public Notify() { final Set<Relationship> rels = new HashSet<>(); rels.add(REL_SUCCESS); rels.add(REL_FAILURE); relationships = Collections.unmodifiableSet(rels); } Notify(); }
Notify extends AbstractProcessor { public Notify() { final Set<Relationship> rels = new HashSet<>(); rels.add(REL_SUCCESS); rels.add(REL_FAILURE); relationships = Collections.unmodifiableSet(rels); } Notify(); @Override Set<Relationship> getRelationships(); @Override void onTrigger(final ProcessContext context, final ProcessSession session); }
Notify extends AbstractProcessor { public Notify() { final Set<Relationship> rels = new HashSet<>(); rels.add(REL_SUCCESS); rels.add(REL_FAILURE); relationships = Collections.unmodifiableSet(rels); } Notify(); @Override Set<Relationship> getRelationships(); @Override void onTrigger(final ProcessContext context, final ProcessSession session); static final PropertyDescriptor DISTRIBUTED_CACHE_SERVICE; static final PropertyDescriptor RELEASE_SIGNAL_IDENTIFIER; static final PropertyDescriptor SIGNAL_COUNTER_NAME; static final PropertyDescriptor SIGNAL_COUNTER_DELTA; static final PropertyDescriptor SIGNAL_BUFFER_COUNT; static final PropertyDescriptor ATTRIBUTE_CACHE_REGEX; static final Relationship REL_SUCCESS; static final Relationship REL_FAILURE; }