1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-10 17:32:46 +00:00

Several improvements

Signed-off-by: Rogiel <rogiel@rogiel.com>
This commit is contained in:
2011-05-19 01:40:53 -03:00
parent 9bb83652e4
commit 2c4af6d91d
263 changed files with 2135 additions and 663 deletions

View File

@@ -41,6 +41,7 @@ import org.slf4j.LoggerFactory;
import com.google.inject.Inject;
import com.l2jserver.model.id.ObjectID;
import com.l2jserver.model.id.object.allocator.IDAllocator;
import com.l2jserver.model.world.WorldObject;
import com.l2jserver.service.AbstractService;
import com.l2jserver.service.AbstractService.Depends;
@@ -116,8 +117,10 @@ public class MySQLDatabaseService extends AbstractService implements
connectionFactory, connectionPool, null, null, false, true);
dataSource = new PoolingDataSource(connectionPool);
// cache must be large enough for all world objects, to avoid
// duplication... this would endanger non-persistent states
objectCache = new Cache(new CacheConfiguration("database-service",
10 * 1000)
IDAllocator.ALLOCABLE_IDS)
.memoryStoreEvictionPolicy(MemoryStoreEvictionPolicy.LRU)
.overflowToDisk(true).eternal(false).timeToLiveSeconds(60)
.timeToIdleSeconds(30).diskPersistent(false)