Package lineage2.commons.threading

Examples of lineage2.commons.threading.RunnableImpl


   * @param delay long
   * @return Future<?>
   */
  public Future<?> addDecayTask(final Creature actor, long delay)
  {
    return schedule(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        actor.doDecay();
View Full Code Here


    if (_player.isFrozen())
    {
      _player.stopFrozen();
    }
   
    ThreadPoolManager.getInstance().schedule(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        _player.teleToLocation(_returnLoc, ReflectionManager.DEFAULT);
View Full Code Here

   */
  private AiTaskManager()
  {
    super(TICK);
    ThreadPoolManager.getInstance().scheduleAtFixedRate(this, Rnd.get(TICK), TICK);
    ThreadPoolManager.getInstance().scheduleAtFixedRate(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        AiTaskManager.this.purge();
View Full Code Here

   */
  private AutoSaveManager()
  {
    super(10000L);
    ThreadPoolManager.getInstance().scheduleAtFixedRate(this, 10000L, 10000L);
    ThreadPoolManager.getInstance().scheduleAtFixedRate(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        AutoSaveManager.this.purge();
View Full Code Here

   * @return Future<?>
   */
  public Future<?> addAutoSaveTask(final Player player)
  {
    long delay = Rnd.get(180, 360) * 1000L;
    return scheduleAtFixedRate(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        if (!player.isOnline())
View Full Code Here

    {
      _teleportSelfTimer = System.currentTimeMillis();
      if (Rnd.chance(20))
      {
        actor.doCast(SkillTable.getInstance().getInfo(4222, 1), actor, false);
        ThreadPoolManager.getInstance().schedule(new RunnableImpl()
        {
          @Override
          public void runImpl()
          {
            actor.teleToLocation(_locations[Rnd.get(_locations.length)]);
View Full Code Here

    }
    if (effected.isDoor() || (effected.isAlikeDead() && !isPreservedOnDeath()))
    {
      return;
    }
    ThreadPoolManager.getInstance().execute(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        boolean success = false;
View Full Code Here

    ServerVariables.unset("Tial_kills");
    ServerVariables.set("SoD_opened", (System.currentTimeMillis() + timelimit) / 1000L);
    _log.info("Seed of Destruction Manager: Opening the seed for " + Util.formatTime((int) timelimit / 1000));
    SpawnManager.getInstance().spawn(SPAWN_GROUP);
    handleDoors(true);
    ThreadPoolManager.getInstance().schedule(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        closeSeed();
View Full Code Here

   */
  public BloodAltarManager()
  {
    _log.info("Blood Altar Manager: Initializing...");
    manageNpcs(true);
    ThreadPoolManager.getInstance().scheduleAtFixedRate(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        if (Rnd.chance(30) && (bossRespawnTimer < System.currentTimeMillis()))
View Full Code Here

   * @param delay long
   * @return ScheduledFuture<?>
   */
  public static ScheduledFuture<?> executeTask(final Player caller, final String className, final String methodName, final Object[] args, final Map<String, Object> variables, long delay)
  {
    return ThreadPoolManager.getInstance().schedule(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        callScripts(caller, className, methodName, args, variables);
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.