mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-15 00:07:39 -04:00
Refactored odb system (read extended), added implementation of Dynamic World Spawns
ODB no longer uses DPL layer of Berkeley DB, persistent classes have to implement the Serializable interface, annotations are no longer used, use transient modifier for variables that should not be persistent. Entity reference errors will no longer occur, however it is better to use ids if the entity that is being referenced is stored in the db too! (or you will have two different objects). DB is cached for 5 minutes then it will write its log/cache to disk, transactions are no longer used.
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
******************************************************************************/
|
||||
package resources.objects;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.nio.ByteOrder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -43,16 +44,17 @@ import com.sleepycat.persist.model.Persistent;
|
||||
@SuppressWarnings("unused")
|
||||
|
||||
@Persistent
|
||||
public class SWGMap<K, V> implements Map<K, V> {
|
||||
public class SWGMap<K, V> implements Map<K, V>, Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Map<K, V> map = new TreeMap<K, V>();
|
||||
@NotPersistent
|
||||
private int updateCounter = 0;
|
||||
private transient int updateCounter = 0;
|
||||
private ObjectMessageBuilder messageBuilder;
|
||||
private byte viewType;
|
||||
private short updateType;
|
||||
@NotPersistent
|
||||
protected final Object objectMutex = new Object();
|
||||
protected transient final Object objectMutex = new Object();
|
||||
|
||||
public SWGMap() { }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user