Made duplicate ID handling more efficient

Shouldn't create a new objectId each server run, by using a duplicateId
database that takes other things (such as planetcrc, templatecrc,
building, container, cell, coordinates)

Currently best solution I can see that doesn't consume a brand new lot
of 20,000 objectids each bootup.
This commit is contained in:
Treeku
2014-03-24 19:20:06 +00:00
parent e363b438ef
commit 94ae856f6f
4 changed files with 60 additions and 10 deletions
+26
View File
@@ -0,0 +1,26 @@
package services.object;
import com.sleepycat.persist.model.Entity;
import com.sleepycat.persist.model.PrimaryKey;
@Entity
public class DuplicateId {
@PrimaryKey
private String key;
private long objectId;
public DuplicateId(String key, long objectId) {
this.key = key;
this.objectId = objectId;
}
public DuplicateId() {
}
public long getObjectId() {
return objectId;
}
}