001 /* 002 @license.text@ 003 */ 004 package biz.hammurapi.util; 005 006 /** 007 * Interface to distribute to multiple threads or multiple 008 * machines. 009 * @author Pavel Vlasov 010 * @revision $Revision$ 011 */ 012 public interface Worker { 013 014 /** 015 * Gives job to worker 016 * @param job 017 * @return true if worker accepted job. There can 018 * be situations when worker cannot accept job. E.g. 019 * remote worker cannot accept non-serializable job. 020 */ 021 boolean post(Runnable job); 022 }