mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-01 16:12:53 -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:
@@ -22,6 +22,8 @@
|
||||
package resources.objects.resource;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import main.NGECore;
|
||||
|
||||
import com.sleepycat.persist.model.NotPersistent;
|
||||
@@ -40,8 +42,9 @@ import resources.objects.tangible.TangibleObject;
|
||||
*/
|
||||
|
||||
@Persistent(version=0)
|
||||
public class ResourceContainerObject extends TangibleObject {
|
||||
public class ResourceContainerObject extends TangibleObject implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
// Unique ID
|
||||
private long containerID;
|
||||
|
||||
@@ -131,10 +134,10 @@ public class ResourceContainerObject extends TangibleObject {
|
||||
*/
|
||||
|
||||
@NotPersistent
|
||||
public static int maximalStackCapacity = 100000;
|
||||
public transient static int maximalStackCapacity = 100000;
|
||||
|
||||
@NotPersistent
|
||||
private ResourceContainerMessageBuilder messageBuilder;
|
||||
private transient ResourceContainerMessageBuilder messageBuilder;
|
||||
|
||||
public ResourceContainerObject(){
|
||||
|
||||
|
||||
Reference in New Issue
Block a user