@Test(expected=IllegalStateException.class) public void testProcessEventError() { pi.processEvent(event, counter); }
public void processEvent(ContentEvent event, int counter) { if (this.piInstances == null || this.piInstances.size() < this.getParallelism()) throw new IllegalStateException("ThreadsWorkerProcessingItem(s) need to be setup before process any event (i.e. in ThreadsTopology.start())."); ThreadsProcessingItemInstance piInstance = this.piInstances.get(counter); ThreadsEventRunnable runnable = new ThreadsEventRunnable(piInstance, event); ThreadsEngine.getThreadWithIndex(piInstance.getThreadIndex()).submit(runnable); }
ThreadsProcessingItem extends AbstractProcessingItem { public void processEvent(ContentEvent event, int counter) { if (this.piInstances == null || this.piInstances.size() < this.getParallelism()) throw new IllegalStateException("ThreadsWorkerProcessingItem(s) need to be setup before process any event (i.e. in ThreadsTopology.start())."); ThreadsProcessingItemInstance piInstance = this.piInstances.get(counter); ThreadsEventRunnable runnable = new ThreadsEventRunnable(piInstance, event); ThreadsEngine.getThreadWithIndex(piInstance.getThreadIndex()).submit(runnable); } }
ThreadsProcessingItem extends AbstractProcessingItem { public void processEvent(ContentEvent event, int counter) { if (this.piInstances == null || this.piInstances.size() < this.getParallelism()) throw new IllegalStateException("ThreadsWorkerProcessingItem(s) need to be setup before process any event (i.e. in ThreadsTopology.start())."); ThreadsProcessingItemInstance piInstance = this.piInstances.get(counter); ThreadsEventRunnable runnable = new ThreadsEventRunnable(piInstance, event); ThreadsEngine.getThreadWithIndex(piInstance.getThreadIndex()).submit(runnable); } ThreadsProcessingItem(Processor processor, int parallelismHint); }
ThreadsProcessingItem extends AbstractProcessingItem { public void processEvent(ContentEvent event, int counter) { if (this.piInstances == null || this.piInstances.size() < this.getParallelism()) throw new IllegalStateException("ThreadsWorkerProcessingItem(s) need to be setup before process any event (i.e. in ThreadsTopology.start())."); ThreadsProcessingItemInstance piInstance = this.piInstances.get(counter); ThreadsEventRunnable runnable = new ThreadsEventRunnable(piInstance, event); ThreadsEngine.getThreadWithIndex(piInstance.getThreadIndex()).submit(runnable); } ThreadsProcessingItem(Processor processor, int parallelismHint); List<ThreadsProcessingItemInstance> getProcessingItemInstances(); void processEvent(ContentEvent event, int counter); void setupInstances(); }
ThreadsProcessingItem extends AbstractProcessingItem { public void processEvent(ContentEvent event, int counter) { if (this.piInstances == null || this.piInstances.size() < this.getParallelism()) throw new IllegalStateException("ThreadsWorkerProcessingItem(s) need to be setup before process any event (i.e. in ThreadsTopology.start())."); ThreadsProcessingItemInstance piInstance = this.piInstances.get(counter); ThreadsEventRunnable runnable = new ThreadsEventRunnable(piInstance, event); ThreadsEngine.getThreadWithIndex(piInstance.getThreadIndex()).submit(runnable); } ThreadsProcessingItem(Processor processor, int parallelismHint); List<ThreadsProcessingItemInstance> getProcessingItemInstances(); void processEvent(ContentEvent event, int counter); void setupInstances();  }