Addition of creature movement fail logger.

This commit is contained in:
MobiusDevelopment 2022-11-08 22:27:35 +00:00
parent e141b9367c
commit db5d726793
31 changed files with 620 additions and 31 deletions

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}

View File

@ -18,8 +18,10 @@ package org.l2jmobius.gameserver.taskmanager;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.l2jmobius.commons.threads.ThreadPool;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Creature;
/**
@ -28,6 +30,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
*/
public class MovementTaskManager
{
private static final Logger LOGGER = Logger.getLogger(MovementTaskManager.class.getName());
private static final Set<Set<Creature>> POOLS = ConcurrentHashMap.newKeySet();
private static final int POOL_SIZE = 1000;
private static final int TASK_DELAY = 100;
@ -48,7 +52,22 @@ public class MovementTaskManager
@Override
public void run()
{
_creatures.removeIf(Creature::updatePosition);
for (Creature creature : _creatures)
{
try
{
if (creature.updatePosition())
{
_creatures.remove(creature);
}
}
catch (Exception e)
{
_creatures.remove(creature);
LOGGER.warning("MovementTaskManager: Problem updating position of " + creature);
LOGGER.warning(CommonUtil.getStackTrace(e));
}
}
}
}