Exemplo n.º 1
0
 private void loadStageZero() {
   final Timer timer = Timing.start("Stage Zero");
   createStageZeroLoader()
       .call(
           new Accessor<StageZero>() {
             @Override
             public void use(StageZero x) {
               Timing.stop(timer);
               loadStageOne(x);
             }
           });
 }
Exemplo n.º 2
0
 private void loadStageOne(final StageZero zero) {
   final Timer timer = Timing.start("Stage One");
   createStageOneLoader(zero)
       .call(
           new Accessor<StageOne>() {
             @Override
             public void use(StageOne x) {
               Timing.stop(timer);
               loadStageTwo(x);
             }
           });
 }
Exemplo n.º 3
0
  private void loadStageTwo(final StageOne one) {
    final Timer timer = Timing.start("Stage Two");
    SchedulerInstance.getHighPriorityTimer()
        .schedule(
            new Scheduler.Task() {

              @Override
              public void execute() {
                createStageTwoLoader(one)
                    .call(
                        new Accessor<StageTwo>() {
                          @Override
                          public void use(StageTwo x) {
                            Timing.stop(timer);
                            loadStageThree(x);
                          }
                        });
              }
            });
  }
Exemplo n.º 4
0
  private void loadStageThree(final StageTwo two) {
    final Timer timer = Timing.start("Stage Tree");
    SchedulerInstance.getHighPriorityTimer()
        .schedule(
            new Scheduler.Task() {

              @Override
              public void execute() {
                createStageThreeLoader(two)
                    .call(
                        new Accessor<StageThree>() {
                          @Override
                          public void use(StageThree x) {
                            Timing.stop(timer);
                            finish();
                          }
                        });
              }
            });
  }