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:
Light2
2014-05-01 20:33:38 +02:00
parent 97743da840
commit 7d457101f3
68 changed files with 650 additions and 375 deletions
+5 -3
View File
@@ -21,6 +21,7 @@
******************************************************************************/
package resources.objects;
import java.io.Serializable;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
@@ -33,12 +34,13 @@ import com.sleepycat.persist.model.Persistent;
import resources.common.StringUtilities;
@Persistent
public abstract class Delta implements IDelta {
public abstract class Delta implements IDelta, Serializable {
private static final long serialVersionUID = 1L;
@NotPersistent
protected final Object objectMutex = new Object();
protected transient final Object objectMutex = new Object();
@NotPersistent
private static SimpleBufferAllocator bufferPool = new SimpleBufferAllocator();
private transient static SimpleBufferAllocator bufferPool = new SimpleBufferAllocator();
public Delta() {