mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-14 00:02:07 -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,8 @@
|
||||
******************************************************************************/
|
||||
package resources.objects.resource;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.sleepycat.je.Environment;
|
||||
import com.sleepycat.je.Transaction;
|
||||
import com.sleepycat.persist.model.Entity;
|
||||
@@ -32,8 +34,9 @@ import com.sleepycat.persist.model.PrimaryKey;
|
||||
*/
|
||||
|
||||
@Entity(version=0)
|
||||
public class ResourceRoot {
|
||||
public class ResourceRoot implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
// Publish 15:
|
||||
|
||||
// - Total: 61, Minimum pool: 15, Random pool: 24 (3 was removed), Fixed pool: 22.
|
||||
@@ -84,7 +87,7 @@ public class ResourceRoot {
|
||||
// All 38 Organic types for each planet
|
||||
|
||||
@NotPersistent
|
||||
private Transaction txn;
|
||||
private transient Transaction txn;
|
||||
|
||||
private static int highestID = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user