Package lineage2.commons.threading

Examples of lineage2.commons.threading.RunnableImpl


      {
        htmltext = "32651-01.htm";
        st.giveItems(EVIDENCE_OF_MIGRATION, 1);
        st.playSound(SOUND_ITEMGET);
        npc.moveToLocation(new Location(npc.getX() + 200, npc.getY() + 200, npc.getZ()), 0, false);
        ThreadPoolManager.getInstance().schedule(new RunnableImpl()
        {
          @Override
          public void runImpl()
          {
            npc.deleteMe();
View Full Code Here


   */
  private ThreadPoolManager()
  {
    _scheduledExecutor = new ScheduledThreadPoolExecutor(Config.SCHEDULED_THREAD_POOL_SIZE, new PriorityThreadFactory("ScheduledThreadPool", Thread.NORM_PRIORITY), new LoggingRejectedExecutionHandler());
    _executor = new ThreadPoolExecutor(Config.EXECUTOR_THREAD_POOL_SIZE, Integer.MAX_VALUE, 5L, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new PriorityThreadFactory("ThreadPoolExecutor", Thread.NORM_PRIORITY), new LoggingRejectedExecutionHandler());
    scheduleAtFixedRate(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        _scheduledExecutor.purge();
View Full Code Here

   * @return Request
   */
  public Request setTimeout(long timeout)
  {
    _timeout = timeout > 0 ? System.currentTimeMillis() + timeout : 0;
    _timeoutTask = ThreadPoolManager.getInstance().schedule(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        timeout();
View Full Code Here

      return;
    conquestBegun = true;
    invoker = leader;
    for(Player p : getPlayers())
      p.sendPacket(new ExShowScreenMessage(NpcString.YOU_WILL_PARTICIPATE_IN_S1_S2_SHORTLY, 8000, ExShowScreenMessage.ScreenMessageAlign.MIDDLE_CENTER, false, 1, -1, false, "#" + NpcString.HEART_OF_IMMORTALITY.getId(), "#" + NpcString.ATTACK.getId()));
    ThreadPoolManager.getInstance().schedule(new RunnableImpl(){
      @Override
      public void runImpl() throws Exception
      {
        for(Player p : getPlayers())
          p.showQuestMovie(ExStartScenePlayer.SCENE_ECHMUS_OPENING);

        ThreadPoolManager.getInstance().schedule(new RunnableImpl(){
          @Override
          public void runImpl() throws Exception
          {
            conquestBegins();
          }
View Full Code Here

    if(notifiedEkimusIdle)
      return;
    notifiedEkimusIdle = true;
    for(Player p : getPlayers())
      p.sendPacket(new ExShowScreenMessage(NpcString.THERE_IS_NO_PARTY_CURRENTLY_CHALLENGING_EKIMUS, 8000, ExShowScreenMessage.ScreenMessageAlign.MIDDLE_CENTER, false, 1, -1, false, "180"));
    ekimusIdleTask = ThreadPoolManager.getInstance().schedule(new RunnableImpl(){
      @Override
      public void runImpl() throws Exception
      {
        conquestConclusion(false);
      }
View Full Code Here

  public void notifyEkimusRoomEntrance()
  {
    for(Playable playable : getZone("[soi_hoi_attack_echmusroom]").getInsidePlayables())
      playable.teleToLocation(new Location(-179537, 211233, -15472));
    ThreadPoolManager.getInstance().schedule(new RunnableImpl(){
      @Override
      public void runImpl() throws Exception
      {
        for(Player p : getPlayers())
          p.sendPacket(new ExShowScreenMessage(NpcString.EKIMUS_HAS_SENSED_ABNORMAL_ACTIVITY, 8000, ExShowScreenMessage.ScreenMessageAlign.MIDDLE_CENTER, false, 1, -1, false));
View Full Code Here

    spawnByGroup("soi_hoe_defence_mob_4");
    spawnByGroup("soi_hoe_defence_mob_5");
    spawnByGroup("soi_hoe_defence_mob_6");
    spawnByGroup("soi_hoe_defence_mob_7");
    spawnByGroup("soi_hoe_defence_mob_8");
    agressionTask = ThreadPoolManager.getInstance().scheduleAtFixedRate(new RunnableImpl(){
      @Override
      public void runImpl() throws Exception
      {
        if(!conquestEnded)
          notifyAttackSeed();
      }
    }, 15000L, 25000L);
    coffinSpawnTask = ThreadPoolManager.getInstance().scheduleAtFixedRate(new RunnableImpl(){
      @Override
      public void runImpl() throws Exception
      {
        if(!conquestEnded)
          for(NpcInstance npc : getAllByNpcId(DeadTumor, true))
            spawnCoffin(npc);
      }
    }, 1000L, 60000L);
    aliveTumorSpawnTask = ThreadPoolManager.getInstance().schedule(new RunnableImpl(){
      @Override
      public void runImpl() throws Exception
      {
        if(!conquestEnded)
        {
View Full Code Here

      NpcInstance seed = getNearestSeed(npc);
      if(seed != null)
        if(npc.getAI().getIntention() == CtrlIntention.AI_INTENTION_ACTIVE)
        {
          npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, seed, 100);
          ThreadPoolManager.getInstance().schedule(new RunnableImpl(){
            @Override
            public void runImpl() throws Exception
            {

              npc.getAggroList().clear(true);
View Full Code Here

    if(failureTask != null)
    {
      failureTask.cancel(false);
      failureTask = null;
    }
    failureTask = ThreadPoolManager.getInstance().schedule(new RunnableImpl(){
      @Override
      public void runImpl() throws Exception
      {
        conquestConclusion(false);
      }
View Full Code Here

        final NpcInstance deadTumor = addSpawnWithoutRespawn(DeadTumor, self.getLoc(), 0);
        notifyTumorDeath();
        self.deleteMe();
        for(Player p : getPlayers())
          p.sendPacket(new ExShowScreenMessage(NpcString.THE_TUMOR_INSIDE_S1_HAS_BEEN_DESTROYED_NTHE_NEARBY_UNDEAD_THAT_WERE_ATTACKING_SEED_OF_LIFE_START_LOSING_THEIR_ENERGY_AND_RUN_AWAY, 8000, ExShowScreenMessage.ScreenMessageAlign.MIDDLE_CENTER, false, 1, -1, false, "#" + NpcString.HALL_OF_EROSION.getId()));
        ThreadPoolManager.getInstance().schedule(new RunnableImpl(){
          @Override
          public void runImpl() throws Exception
          {
            deadTumor.deleteMe();
            addSpawnWithoutRespawn(AliveTumor, deadTumor.getLoc(), 0);
View Full Code Here

TOP

Related Classes of lineage2.commons.threading.RunnableImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.