@Test public void testInitializeJobWorkflow02() { int resetTime = 301; boolean includeMessages = false; ArrayList<Integer> rwTimes = new ArrayList<>(); rwTimes.add( 45 ); rwTimes.add( 120 ); List<MineJob> jWorkflow = initializeJobWorkflow( resetTime, includeMessages, rwTimes ); assertEquals( 1L, jWorkflow.size() ); Stack<MineJob> jobStack = new Stack<>(); jobStack.addAll( jWorkflow ); assertEquals( 1L, jobStack.size() ); MineJob job = jobStack.pop(); assertEquals( 0L, jobStack.size() ); assertTrue( job.getAction() == MineJobAction.RESET_SYNC ); assertEquals( resetTime, job.getDelayActionSec(), 0.1d ); }
private List<MineJob> initializeJobWorkflow() { if ( PrisonMines.getInstance() != null ) { MinesConfig config = PrisonMines.getInstance().getConfig(); return initializeJobWorkflow(getResetTime(), config.resetMessages, config.resetWarningTimes ); } return new ArrayList<>(); }
MineScheduler extends MineReset implements PrisonRunnable { private List<MineJob> initializeJobWorkflow() { if ( PrisonMines.getInstance() != null ) { MinesConfig config = PrisonMines.getInstance().getConfig(); return initializeJobWorkflow(getResetTime(), config.resetMessages, config.resetWarningTimes ); } return new ArrayList<>(); } }
MineScheduler extends MineReset implements PrisonRunnable { private List<MineJob> initializeJobWorkflow() { if ( PrisonMines.getInstance() != null ) { MinesConfig config = PrisonMines.getInstance().getConfig(); return initializeJobWorkflow(getResetTime(), config.resetMessages, config.resetWarningTimes ); } return new ArrayList<>(); } MineScheduler(); }
MineScheduler extends MineReset implements PrisonRunnable { private List<MineJob> initializeJobWorkflow() { if ( PrisonMines.getInstance() != null ) { MinesConfig config = PrisonMines.getInstance().getConfig(); return initializeJobWorkflow(getResetTime(), config.resetMessages, config.resetWarningTimes ); } return new ArrayList<>(); } MineScheduler(); @Override void run(); void terminateJob(); void submit( int offset ); void manualReset(); boolean checkZeroBlockReset(); List<MineJob> getJobWorkflow(); void setJobWorkflow( List<MineJob> jobWorkflow ); Stack<MineJob> getJobStack(); void setJobStack( Stack<MineJob> jobStack ); MineJob getCurrentJob(); void setCurrentJob( MineJob currentJob ); Integer getTaskId(); void setTaskId( Integer taskId ); }
MineScheduler extends MineReset implements PrisonRunnable { private List<MineJob> initializeJobWorkflow() { if ( PrisonMines.getInstance() != null ) { MinesConfig config = PrisonMines.getInstance().getConfig(); return initializeJobWorkflow(getResetTime(), config.resetMessages, config.resetWarningTimes ); } return new ArrayList<>(); } MineScheduler(); @Override void run(); void terminateJob(); void submit( int offset ); void manualReset(); boolean checkZeroBlockReset(); List<MineJob> getJobWorkflow(); void setJobWorkflow( List<MineJob> jobWorkflow ); Stack<MineJob> getJobStack(); void setJobStack( Stack<MineJob> jobStack ); MineJob getCurrentJob(); void setCurrentJob( MineJob currentJob ); Integer getTaskId(); void setTaskId( Integer taskId );  }