public interface BatchSession extends Session
ACTION_ADD_NODE, ACTION_READ, ACTION_REMOVE, ACTION_SET_PROPERTY
Modifier and Type | Method and Description |
---|---|
void |
addListener(BatchSessionListener listener)
Add a
BatchSessionListener to the session, to receive notifications when the session auto-saves |
void |
commit()
Immediately re-enables session saves and autoSaves, and then saves any uncommitted changes.
|
boolean |
disableAutoSave()
Disables autoSave even when the batchSize is exceeded.
|
boolean |
disableSessionSave()
Ignore calls to session saves.
|
boolean |
enableAutoSave()
Re-enables autoSave for future changes after a call to
disableAutoSave() . |
boolean |
enableSessionSave()
Re-enable calls to session saves after a call to
disableSessionSave() |
int |
getBatchSize() |
Set<String> |
getCommittedPaths() |
Session |
getSession() |
int |
getTotalSaves() |
Set<String> |
getUncommittedPaths() |
boolean |
isAutoSaveEnabled() |
boolean |
isSessionSaveEnabled() |
void |
purge(String path)
Recursively removes the subgraph of Nodes and related
Version Nodes,
descending from path , by traversing depth-first to the leaves and removing each node
on the way up. |
void |
removeListener(BatchSessionListener listener)
Removes a
BatchSessionListener from the session. |
void |
setBatchSize(int batchSize)
The batch size determines when the BatchSession will auto-save.
|
addLockToken, checkPermission, exportDocumentView, exportDocumentView, exportSystemView, exportSystemView, getAccessControlManager, getAttribute, getAttributeNames, getImportContentHandler, getItem, getLockTokens, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, getNode, getNodeByIdentifier, getNodeByUUID, getProperty, getRepository, getRetentionManager, getRootNode, getUserID, getValueFactory, getWorkspace, hasCapability, hasPendingChanges, hasPermission, impersonate, importXML, isLive, itemExists, logout, move, nodeExists, propertyExists, refresh, removeItem, removeLockToken, save, setNamespacePrefix
Session getSession()
void addListener(BatchSessionListener listener)
BatchSessionListener
to the session, to receive notifications when the session auto-saveslistener
- the listener to be addedvoid removeListener(BatchSessionListener listener)
BatchSessionListener
from the session.listener
- the listener to be removed.void setBatchSize(int batchSize)
batchSize
- int getBatchSize()
int getTotalSaves()
Set<String> getCommittedPaths()
Set<String> getUncommittedPaths()
boolean disableSessionSave()
enableSessionSave()
to re-enable
Session.save()boolean enableSessionSave()
disableSessionSave()
boolean isSessionSaveEnabled()
Session.save()
will actually do anythingboolean disableAutoSave()
enableAutoSave()
to re-enable autoSaves.boolean enableAutoSave()
disableAutoSave()
.boolean isAutoSaveEnabled()
void commit() throws RepositoryException
RepositoryException
void purge(String path) throws RepositoryException
Version
Nodes,
descending from path
, by traversing depth-first to the leaves and removing each node
on the way up. Versions are marked for removal, but are only removed after a session save because
version modifications are workspace-write operations, not session-write operations.path
- the node at the top of the subgraphRepositoryException
- if anything goes wrongCopyright © 2013. All Rights Reserved.