mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-09-30 15:13:10 -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.mission;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.sleepycat.je.Environment;
|
||||
import com.sleepycat.je.Transaction;
|
||||
import com.sleepycat.persist.model.NotPersistent;
|
||||
@@ -36,8 +38,9 @@ import engine.resources.scene.Point3D;
|
||||
import engine.resources.scene.Quaternion;
|
||||
|
||||
@Persistent(version=1)
|
||||
public class MissionObject extends IntangibleObject implements IPersistent {
|
||||
|
||||
public class MissionObject extends IntangibleObject implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Point3D destination;
|
||||
private Point3D startLocation;
|
||||
private String startPlanet = "";
|
||||
@@ -56,11 +59,8 @@ public class MissionObject extends IntangibleObject implements IPersistent {
|
||||
private MissionObjective objective;
|
||||
|
||||
@NotPersistent
|
||||
MissionMessageBuilder messageBuilder = new MissionMessageBuilder(this);
|
||||
|
||||
@NotPersistent
|
||||
private Transaction txn;
|
||||
|
||||
private transient MissionMessageBuilder messageBuilder = new MissionMessageBuilder(this);
|
||||
|
||||
public MissionObject() {
|
||||
super();
|
||||
}
|
||||
@@ -286,14 +286,6 @@ public class MissionObject extends IntangibleObject implements IPersistent {
|
||||
this.missionId = missionId;
|
||||
}
|
||||
|
||||
public Transaction getTransaction() {
|
||||
return txn;
|
||||
}
|
||||
|
||||
public void createTransaction(Environment env) {
|
||||
txn = env.beginTransaction(null, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendBaselines(Client destination) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user