/** * Tries to process the supplied input item, which was received from the * edge with ordinal 3. May choose to process only partially and return * {@code false}, in which case it will be called again later with the same * item before any other processing method is called. * <p> * The default implementation delegates to {@link #tryProcess(int, Object) * tryProcess(3, item)}. * * @param item item to be processed * @return {@code true} if this item has now been processed, * {@code false} otherwise. */ protected boolean tryProcess3(@Nonnull Object item) throws Exception { return tryProcess(3, item); }
/** * Tries to process the supplied input item, which was received from the * edge with ordinal 0. May choose to process only partially and return * {@code false}, in which case it will be called again later with the same * item before any other processing method is called. * <p> * The default implementation delegates to {@link #tryProcess(int, Object) * tryProcess(0, item)}. * * @param item item to be processed * @return {@code true} if this item has now been processed, * {@code false} otherwise. */ protected boolean tryProcess0(@Nonnull Object item) throws Exception { return tryProcess(0, item); }
/** * Tries to process the supplied input item, which was received from the * edge with ordinal 1. May choose to process only partially and return * {@code false}, in which case it will be called again later with the same * item before any other processing method is called. * <p> * The default implementation delegates to {@link #tryProcess(int, Object) * tryProcess(1, item)}. * * @param item item to be processed * @return {@code true} if this item has now been processed, * {@code false} otherwise. */ protected boolean tryProcess1(@Nonnull Object item) throws Exception { return tryProcess(1, item); }
/** * Tries to process the supplied input item, which was received from the * edge with ordinal 2. May choose to process only partially and return * {@code false}, in which case it will be called again later with the same * item before any other processing method is called. * <p> * The default implementation delegates to {@link #tryProcess(int, Object) * tryProcess(2, item)}. * * @param item item to be processed * @return {@code true} if this item has now been processed, * {@code false} otherwise. */ protected boolean tryProcess2(@Nonnull Object item) throws Exception { return tryProcess(2, item); }
/** * Tries to process the supplied input item, which was received from the * edge with ordinal 4. May choose to process only partially and return * {@code false}, in which case it will be called again later with the same * item before any other processing method is called. * <p> * The default implementation delegates to {@link #tryProcess(int, Object) * tryProcess(4, item)}. * * @param item item to be processed * @return {@code true} if this item has now been processed, * {@code false} otherwise. */ @SuppressWarnings("checkstyle:magicnumber") protected boolean tryProcess4(@Nonnull Object item) throws Exception { return tryProcess(4, item); }
void processAny(int ordinal, @Nonnull Inbox inbox) throws Exception { for (Object item; (item = inbox.peek()) != null && tryProcess(ordinal, item); ) { inbox.remove(); } } }