|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IContainer<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>
Interface to implement to serve as data storage for controler.
| Method Summary | |
|---|---|
void |
batchDelete(Item<T,C>[] items,
boolean keepTrack)
Delete an array of items all at once, items which are not found will simply be ignored. |
void |
batchMerge(C[] ids)
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)
Save array of items all at once. |
void |
clear()
Clear all data in the container. |
void |
close()
Close the container. |
void |
commit()
Commit all changes. |
void |
delete(Item<T,C> it,
boolean keepTrack)
Delete the item. |
C[] |
deletedIds()
Retrieve list of IDs that have been deleted. |
C[] |
deletedIdsSince(long timestamp)
Retrieve a list of IDs that have been deleted since the given timestamp. |
void |
duplicate(IContainer<T,C> cont)
Converts the given IContainer into an hessian implementation. |
boolean |
inUse(C id)
Determine if the given id is in use. |
boolean |
isClosed()
Determine if the container has already been closed. |
C[] |
listModifiedSince(long timestamp)
List all items modified since the given timestamp. |
Item<T,C>[] |
load(C[] ids,
boolean allVersions)
Load multiple items at once, using the specified ids. |
Item<T,C> |
load(C id,
boolean allVersions)
Load an item using its id. |
Item<T,C>[] |
modifiedSince(long timestamp,
boolean allVersions)
Load all items modified since the given timestamp. |
void |
release(java.lang.Object obj)
Release the object so it can be garbage collected immediately. |
void |
rollback()
Rollback and discard all changes since last commit. |
void |
save(Item<T,C> it)
Save the item. |
void |
waitForPendingSaves()
Wait for all saves and deletes pending tasks to finish. |
void |
waitForPendingTasks()
Wait for all tasks pending tasks to finish. |
| Method Detail |
|---|
void batchDelete(Item<T,C>[] items,
boolean keepTrack)
throws java.io.IOException
T - Type of object in the items, must extend VersionableObject.items - Items to be deleted.keepTrack - Whether or not the ID should be kept in history.
java.io.IOException
void batchMerge(C[] ids)
throws java.io.IOException
ids - IDs to be merged.
java.io.IOException
void batchSave(Item<T,C>[] items,
boolean abortOnDuplicate)
throws java.io.IOException
T - Type of object in the items, must extend VersionableObject.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.IOExceptionvoid clear()
void close()
throws java.io.IOException
java.io.IOExceptionvoid commit()
void delete(Item<T,C> it,
boolean keepTrack)
throws java.io.IOException
T - Type of object in the item, must extend VersionableObject.it - Item to be deleted.keepTrack - Whether or not the ID should be kept in history.
java.io.IOException
C[] deletedIds()
throws java.io.IOException
java.io.IOException
C[] deletedIdsSince(long timestamp)
throws java.io.IOException
timestamp - Timestamp to use.
java.io.IOException
void duplicate(IContainer<T,C> cont)
throws java.io.IOException
cont - IContainer to convert.
java.io.IOException
boolean inUse(C id)
throws java.io.IOException
id - ID to check.
java.io.IOExceptionboolean isClosed()
C[] listModifiedSince(long timestamp)
throws java.io.IOException
timestamp - Timestamp to use.
java.io.IOException
Item<T,C> load(C id,
boolean allVersions)
throws java.io.IOException
id - ID to look for.allVersions - Whether or not all versions should be loaded.
java.io.IOException
Item<T,C>[] load(C[] ids,
boolean allVersions)
throws java.io.IOException
ids - Array of IDs to look for.allVersions - Whether or not all versions should be loaded.
java.io.IOException
Item<T,C>[] modifiedSince(long timestamp,
boolean allVersions)
throws java.io.IOException
timestamp - Timestamp to use.allVersions - Whether or not all versions should be loaded.
java.io.IOExceptionvoid release(java.lang.Object obj)
obj - Object to release.void rollback()
void save(Item<T,C> it)
throws java.io.IOException
T - Type of object in the item, must extend VersionableObject.it - Item to be saved.
java.io.IOExceptionvoid waitForPendingSaves()
void waitForPendingTasks()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||