|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ov4j.db4oImpl.MemoryContainer<T,C>
@Deprecated public class MemoryContainer<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>
Implementation of IContainer using DB4O memory databases.
| Field Summary | |
|---|---|
protected com.db4o.ext.ExtObjectContainer |
db
Deprecated. The data storing database. |
protected com.db4o.ext.ExtObjectContainer |
mapDB
Deprecated. The ID map database. |
protected com.db4o.ext.ExtObjectContainer |
unmapDB
Deprecated. Database storing map of deleted IDs. |
| Constructor Summary | |
|---|---|
MemoryContainer(java.lang.String dbName,
long delay,
long saveInterval)
Deprecated. Constructor. |
|
| Method Summary | |
|---|---|
protected void |
backup()
Deprecated. Backup the data and ID map databases. |
void |
batchDelete(Item<T,C>[] items,
boolean keepTrack)
Deprecated. Delete an array of items all at once, items which are not found will simply be ignored. |
void |
batchMerge(C[] ids)
Deprecated. Merge an array of items all at once, items which are not found will simply be ignored. |
void |
batchSave(Item<T,C>[] items,
boolean abortOnDuplicate)
Deprecated. Save array of items all at once. |
void |
clear()
Deprecated. Clear the database, will not clear the backups. |
void |
clearDeletedIDs()
Deprecated. |
void |
close()
Deprecated. Close the container. |
void |
close(boolean removeHook)
Deprecated. Close the container, possibly removing shutdown hook. |
void |
commit()
Deprecated. Commit all changes. |
protected void |
configure()
Deprecated. Configure database, subclasses should overload this method, but still call super.configure() so that everything is configured correctly. |
void |
delete(Item<T,C> it,
boolean keepTrack)
Deprecated. Delete the item. |
C[] |
deletedIds()
Deprecated. Retrieve list of IDs that have been deleted. |
C[] |
deletedIdsSince(long timestamp)
Deprecated. Retrieve a list of IDs that have been deleted since the given timestamp. |
void |
duplicate(IContainer<T,C> cont)
Deprecated. Converts the given IContainer into an hessian implementation. |
static int |
getBlockSize()
Deprecated. |
boolean |
inUse(C id)
Deprecated. Determine if the given id is in use. |
boolean |
isClosed()
Deprecated. Determine if the container has already been closed. |
C[] |
listModifiedSince(long timestamp)
Deprecated. List all items modified since the given timestamp. |
Item<T,C>[] |
load(C[] ids,
boolean allVersions)
Deprecated. Load multiple items at once, using the specified ids. |
Item<T,C> |
load(C id,
boolean allVersions)
Deprecated. Load an item using its id. |
Item<T,C>[] |
modifiedSince(long timestamp,
boolean allVersions)
Deprecated. Load all items modified since the given timestamp. |
void |
release(java.lang.Object obj)
Deprecated. Release the object so it can be garbage collected immediately. |
java.lang.Object |
resolveConflict(com.db4o.replication.ReplicationProcess proc,
java.lang.Object objA,
java.lang.Object objB)
Deprecated. Always returns object A as replication is always used to backup in peer B. |
void |
rollback()
Deprecated. Rollback and discard all changes since last commit. |
void |
save(Item<T,C> it)
Deprecated. Save the item. |
static void |
setBlockSize(int blockSize)
Deprecated. |
java.lang.String |
toString()
Deprecated. Returns a string representation of this Container. |
void |
waitForPendingSaves()
Deprecated. Wait for all saves and deletes pending tasks to finish. |
void |
waitForPendingTasks()
Deprecated. Wait for all tasks pending tasks to finish. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected com.db4o.ext.ExtObjectContainer db
protected com.db4o.ext.ExtObjectContainer mapDB
protected com.db4o.ext.ExtObjectContainer unmapDB
| Constructor Detail |
|---|
public MemoryContainer(java.lang.String dbName,
long delay,
long saveInterval)
dbName - Name of the database.delay - Delay before the first save.saveInterval - Interval (in ms) between periodic replication to backup database.| Method Detail |
|---|
public static int getBlockSize()
public static void setBlockSize(int blockSize)
blockSize - the blockSize to setprotected void backup()
public void batchDelete(Item<T,C>[] items,
boolean keepTrack)
IContainer
batchDelete in interface IContainer<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>items - Items to be deleted.keepTrack - Whether or not the ID should be kept in history.org.ov4j.IContainer#batchDelete(org.ov4j.data.Item[]) public void batchMerge(C[] ids)
IContainer
batchMerge in interface IContainer<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>ids - IDs to be merged.IContainer.batchMerge(java.lang.Comparable[])
public void batchSave(Item<T,C>[] items,
boolean abortOnDuplicate)
throws java.io.IOException
IContainer
batchSave in interface IContainer<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>items - Array of items to be saved.abortOnDuplicate - Whether or not saving should abort when an item has an ID already in use.
java.io.IOExceptionorg.ov4j.IContainer#batchSave(org.ov4j.data.Item[], boolean) public void clear()
clear in interface IContainer<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>IContainer.clear()public void clearDeletedIDs()
org.ov4j.IContainer#clearDeletedIDs()public void close()
IContainer
close in interface IContainer<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>IContainer.close()public void close(boolean removeHook)
removeHook - Whether or not the shutdown hook should be removed first.public void commit()
IContainer
commit in interface IContainer<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>IContainer.commit()protected void configure()
public void delete(Item<T,C> it,
boolean keepTrack)
IContainer
delete in interface IContainer<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>it - Item to be deleted.keepTrack - Whether or not the ID should be kept in history.org.ov4j.IContainer#delete(org.ov4j.data.Item)public C[] deletedIds()
IContainer
deletedIds in interface IContainer<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>IContainer.deletedIds()public C[] deletedIdsSince(long timestamp)
IContainer
deletedIdsSince in interface IContainer<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>timestamp - Timestamp to use.
IContainer.deletedIdsSince(long)
public void duplicate(IContainer<T,C> cont)
throws java.io.IOException
duplicate in interface IContainer<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>cont - IContainer to convert.
java.io.IOExceptionpublic boolean inUse(C id)
IContainer
inUse in interface IContainer<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>id - ID to check.
IContainer.inUse(java.lang.Comparable)public boolean isClosed()
IContainer
isClosed in interface IContainer<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>IContainer.isClosed()
public C[] listModifiedSince(long timestamp)
throws java.io.IOException
IContainer
listModifiedSince in interface IContainer<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>timestamp - Timestamp to use.
java.io.IOExceptionIContainer.listModifiedSince(long)
public Item<T,C> load(C id,
boolean allVersions)
IContainer
load in interface IContainer<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>id - ID to look for.allVersions - Whether or not all versions should be loaded.
IContainer.load(java.lang.Comparable, boolean)
public Item<T,C>[] load(C[] ids,
boolean allVersions)
IContainer
load in interface IContainer<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>ids - Array of IDs to look for.allVersions - Whether or not all versions should be loaded.
IContainer.load(java.lang.Comparable, boolean)
public Item<T,C>[] modifiedSince(long timestamp,
boolean allVersions)
IContainer
modifiedSince in interface IContainer<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>timestamp - Timestamp to use.allVersions - Whether or not all versions should be loaded.
IContainer.modifiedSince(long, boolean)public void release(java.lang.Object obj)
IContainer
release in interface IContainer<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>obj - Object to release.IContainer.release(java.lang.Object)
public java.lang.Object resolveConflict(com.db4o.replication.ReplicationProcess proc,
java.lang.Object objA,
java.lang.Object objB)
resolveConflict in interface com.db4o.replication.ReplicationConflictHandlerReplicationConflictHandler.resolveConflict(com.db4o.replication.ReplicationProcess,
java.lang.Object, java.lang.Object)public void rollback()
IContainer
rollback in interface IContainer<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>IContainer.rollback()public void save(Item<T,C> it)
IContainer
save in interface IContainer<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>it - Item to be saved.IContainer.save(org.ov4j.data.Item)public java.lang.String toString()
toString in class java.lang.Objectpublic void waitForPendingSaves()
IContainer
waitForPendingSaves in interface IContainer<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>public void waitForPendingTasks()
IContainer
waitForPendingTasks in interface IContainer<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||