mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-30 00:15:57 -04:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user