Class SessionImpl
- java.lang.Object
-
- org.nuxeo.ecm.core.storage.sql.SessionImpl
-
- All Implemented Interfaces:
AutoCloseable
,Session
public class SessionImpl extends Object implements Session
The session is the main high level access point to data from the underlying database.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
SessionImpl.QueryResultContext
-
Nested classes/interfaces inherited from interface org.nuxeo.ecm.core.storage.sql.Session
Session.PathResolver
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
changeTokenEnabled
static String
COMPAT_REPOSITORY_NAME_KEY
Set this system property to false if you don't want repositories to be looked up under the compatibility name "default" in the "repositories" table.PersistenceContext
context
protected FulltextDescriptor
fulltextDescriptor
protected Set<SessionImpl.QueryResultContext>
queryResults
protected io.dropwizard.metrics5.MetricRegistry
registry
protected RepositoryImpl
repository
-
Constructor Summary
Constructors Constructor Description SessionImpl(RepositoryImpl repository, Model model, Mapper mapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Node
addChildNode(Serializable id, Node parent, String name, Long pos, String typeName, boolean complexProp)
Creates a new child node with given id (used for import).Node
addChildNode(Node parent, String name, Long pos, String typeName, boolean complexProp)
Creates a new child node.boolean
addMixinType(Node node, String mixin)
Adds a mixin to a node.protected Node
addNode(Serializable id, Serializable parentId, String name, Long pos, String typeName, boolean complexProp)
Node
addProxy(Serializable targetId, Serializable versionableId, Node parent, String name, Long pos)
Creates a proxy for a version node.Node
checkIn(Node node, String label, String checkinComment)
Checks in a checked-out node: creates a new version with a copy of its information.protected void
checkInvalidationsConflict()
Post transaction check invalidations processing.void
checkOut(Node node)
Checks out a checked-in node.int
cleanupDeletedDocuments(int max, Calendar beforeTime)
protected int
clearCaches()
Clears all the caches.void
close()
protected void
closeQueryResults()
protected void
closeSession()
void
commit()
Node
copy(Node source, Node parent, String name, Consumer<Node> afterRecordCopy)
Copies a node to a new location with a new name.protected void
doFlush()
void
end()
protected void
findPrefetchedFragments(SimpleFragment hierFragment, List<RowId> bulkRowIds, Set<Serializable> proxyIds)
Finds prefetched fragments for a hierarchy fragment, takes note of the ones that are proxies.protected void
flush()
protected Serializable
generateNewId(Serializable id)
Generates a new id, or used a pre-generated one (import).Map<String,String>
getBinaryFulltext(Serializable id, Document doc)
Gets the fulltext extracted from the binary fields.long
getCacheMapperSize()
long
getCachePristineSize()
long
getCacheSelectionSize()
long
getCacheSize()
Node
getChildNode(Node parent, String name, boolean complexProp)
Gets a child node given its parent and name.List<Node>
getChildren(Node parent, String name, boolean complexProp)
Gets the children of a node.protected Set<String>
getChildrenNames(String primaryType, List<String> mixins)
Gets complex children names defined by the primary type and the list of mixins.protected Serializable
getContainingDocument(Serializable id)
protected PersistenceContext
getContext()
protected List<Work>
getFulltextWorks()
Gets the fulltext updates to do.protected List<Fragment>
getHierarchyAndAncestors(Collection<Serializable> ids)
Fetches the hierarchy fragment for the given rows and all their ancestors.Node
getLastVersion(Serializable versionSeriesId)
Gets the last version for a given version series id.LockManager
getLockManager()
Gets the lock manager for this session.Mapper
getMapper()
Gets the low-level Mapper for this session.Model
getModel()
Gets theModel
associated to this session.Node
getNodeById(Serializable id)
Gets a node given its id.protected Node
getNodeById(Serializable id, boolean prefetch)
Node
getNodeByPath(String path, Node node)
Gets a node given its absolute path, or given an existing node and a relative path.protected List<Node>
getNodes(List<Serializable> ids)
List<Node>
getNodesByIds(Collection<Serializable> ids)
Gets several nodes given their ids.List<Node>
getNodesByIds(Collection<Serializable> ids, boolean prefetch)
Node
getParentNode(Node node)
Gets the parent of a node.String
getPath(Node node)
Gets the absolute path of a node.List<Node>
getProxies(Node document)
Finds the proxies for a document.List<Node>
getProxies(Node document, Node parent)
Finds the proxies for a document.String
getRepositoryName()
Gets the session repository name.Node
getRootNode()
Gets the root node of the repository.Node
getVersionByLabel(Serializable versionSeriesId, String label)
Gets a version given its version series id and label.List<Node>
getVersions(Serializable versionSeriesId)
Gets all the versions for a given version series id.boolean
hasChildNode(Node parent, String name, boolean complexProp)
Checks if a child node with the given name exists.boolean
hasChildren(Node parent, boolean complexProp)
Checks it a node has children.boolean
isChangeTokenEnabled()
Checks if change token management is enabled.boolean
isFulltextStoredInBlob()
Checks if fulltext extracted from the binary fields is internally stored as a blob.protected boolean
isIdNew(Serializable id)
protected void
markIndexingInProgress(Set<Serializable> dirtyIds)
Mark indexing in progress, so that future copies (including versions) will be indexed as well.void
markReferencedBlobs(BiConsumer<String,String> markerCallback)
void
markUserChange(Serializable id)
Marks the document as being modified by a user change.Node
move(Node source, Node parent, String name)
Moves a node to a new location with a new name.protected String
normalize(String path)
protected void
noteQueryResult(IterableQueryResult result)
void
orderBefore(Node parent, Node source, Node dest)
Order the given source child node before the destination child node.protected void
processReceivedInvalidations()
Processes all invalidations accumulated.PartialList<Serializable>
query(String query, String queryType, QueryFilter queryFilter, long countUpTo)
Makes a query to the database.PartialList<Serializable>
query(String query, QueryFilter queryFilter, boolean countTotal)
Makes a NXQL query to the database.IterableQueryResult
queryAndFetch(String query, String queryType, QueryFilter queryFilter, boolean distinctDocuments, Object... params)
Makes a query to the database and returns an iterable (which must be closed when done).IterableQueryResult
queryAndFetch(String query, String queryType, QueryFilter queryFilter, Object... params)
Makes a query to the database and returns an iterable (which must be closed when done).PartialList<Map<String,Serializable>>
queryProjection(String query, String queryType, QueryFilter queryFilter, boolean distinctDocuments, long countUpTo, Object... params)
Makes a query to the database.void
rebuildReadAcls()
Rebuild the read ACLs for the whole repository.boolean
removeMixinType(Node node, String mixin)
Removes a mixin from a node.void
removeNode(Node node, Consumer<Node> beforeRemove)
Removes a node from the storage.void
removePropertyNode(Node node)
Removes a property node from the storage.void
requireReadAclsUpdate()
Read ACLs are optimized ACLs for the read permission, they need to be updated after document creation or ACL change.void
restore(Node node, Node version)
Restores a node to a given version.void
rollback()
void
save()
Saves the modifications to persistent storage.protected void
scheduleWork(List<Work> works)
ScrollResult<String>
scroll(String scrollId)
Get the next batch of results containing id of documents, thescrollId
is part of the previousScrollResult
response.ScrollResult<String>
scroll(String query, int batchSize, int keepAliveSeconds)
Executes the given query and returns the first batch of results containing id of documents, next batch must be requested within thekeepAliveSeconds
delay.ScrollResult<String>
scroll(String query, QueryFilter queryFilter, int batchSize, int keepAliveSeconds)
Executes the given query and returns the first batch of results containing id of documents, next batch must be requested within thekeepAliveSeconds
delay.protected void
sendInvalidationsToOthers()
Post-transaction invalidations notification.void
setProxyTarget(Node proxy, Serializable targetId)
Sets a proxies' target.void
start()
void
updateReadAcls()
Update only the read ACLs that have changed.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.ecm.core.storage.sql.Session
copy, getBinaryFulltext, removeNode
-
-
-
-
Field Detail
-
COMPAT_REPOSITORY_NAME_KEY
public static final String COMPAT_REPOSITORY_NAME_KEY
Set this system property to false if you don't want repositories to be looked up under the compatibility name "default" in the "repositories" table.Only do this if you start from an empty database, or if you have migrated the "repositories" table by hand, or if you need to create a new repository in a database already containing a "default" repository (table sharing, not recommended).
- See Also:
- Constant Field Values
-
repository
protected final RepositoryImpl repository
-
context
public final PersistenceContext context
-
changeTokenEnabled
protected final boolean changeTokenEnabled
-
fulltextDescriptor
protected final FulltextDescriptor fulltextDescriptor
-
registry
protected final io.dropwizard.metrics5.MetricRegistry registry
-
queryResults
protected final Set<SessionImpl.QueryResultContext> queryResults
-
-
Constructor Detail
-
SessionImpl
public SessionImpl(RepositoryImpl repository, Model model, Mapper mapper)
-
-
Method Detail
-
getMapper
public Mapper getMapper()
Description copied from interface:Session
Gets the low-level Mapper for this session.
-
clearCaches
protected int clearCaches()
Clears all the caches. Called by RepositoryManagement.
-
getContext
protected PersistenceContext getContext()
-
generateNewId
protected Serializable generateNewId(Serializable id)
Generates a new id, or used a pre-generated one (import).
-
isIdNew
protected boolean isIdNew(Serializable id)
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceSession
-
closeSession
protected void closeSession()
-
getRepositoryName
public String getRepositoryName()
Description copied from interface:Session
Gets the session repository name.- Specified by:
getRepositoryName
in interfaceSession
- Returns:
- the repository name
-
getModel
public Model getModel()
Description copied from interface:Session
Gets theModel
associated to this session.
-
getRootNode
public Node getRootNode()
Description copied from interface:Session
Gets the root node of the repository.- Specified by:
getRootNode
in interfaceSession
- Returns:
- the root node
-
save
public void save()
Description copied from interface:Session
Saves the modifications to persistent storage.Modifications will be actually written only upon transaction commit.
-
flush
protected void flush()
-
doFlush
protected void doFlush()
-
getContainingDocument
protected Serializable getContainingDocument(Serializable id)
-
getFulltextWorks
protected List<Work> getFulltextWorks()
Gets the fulltext updates to do. Called at save() time.- Returns:
- a list of
Work
instances to schedule post-commit.
-
markIndexingInProgress
protected void markIndexingInProgress(Set<Serializable> dirtyIds)
Mark indexing in progress, so that future copies (including versions) will be indexed as well.
-
sendInvalidationsToOthers
protected void sendInvalidationsToOthers()
Post-transaction invalidations notification.Called post-transaction by session commit/rollback or transactionless save.
-
processReceivedInvalidations
protected void processReceivedInvalidations()
Processes all invalidations accumulated.Called pre-transaction by start or transactionless save;
-
checkInvalidationsConflict
protected void checkInvalidationsConflict()
Post transaction check invalidations processing.
-
getNodeById
protected Node getNodeById(Serializable id, boolean prefetch)
-
getNodeById
public Node getNodeById(Serializable id)
Description copied from interface:Session
Gets a node given its id.- Specified by:
getNodeById
in interfaceSession
- Parameters:
id
- the id- Returns:
- the node, or
null
if not found
-
getNodesByIds
public List<Node> getNodesByIds(Collection<Serializable> ids, boolean prefetch)
-
findPrefetchedFragments
protected void findPrefetchedFragments(SimpleFragment hierFragment, List<RowId> bulkRowIds, Set<Serializable> proxyIds)
Finds prefetched fragments for a hierarchy fragment, takes note of the ones that are proxies.
-
getNodesByIds
public List<Node> getNodesByIds(Collection<Serializable> ids)
Description copied from interface:Session
Gets several nodes given their ids.- Specified by:
getNodesByIds
in interfaceSession
- Parameters:
ids
- the ids- Returns:
- the nodes, in the same order as the ids, with elements being
null
if not found
-
getParentNode
public Node getParentNode(Node node)
Description copied from interface:Session
Gets the parent of a node.The root has a
null
parent.- Specified by:
getParentNode
in interfaceSession
- Parameters:
node
- the node- Returns:
- the parent node, or
null
for the root's parent
-
getPath
public String getPath(Node node)
Description copied from interface:Session
Gets the absolute path of a node.
-
getNodeByPath
public Node getNodeByPath(String path, Node node)
Description copied from interface:Session
Gets a node given its absolute path, or given an existing node and a relative path.- Specified by:
getNodeByPath
in interfaceSession
- Parameters:
path
- the pathnode
- the node (ignored for absolute paths)- Returns:
- the node, or
null
if not found
-
addMixinType
public boolean addMixinType(Node node, String mixin)
Description copied from interface:Session
Adds a mixin to a node.Does nothing if the mixin was already present on the node.
- Specified by:
addMixinType
in interfaceSession
- Parameters:
node
- the nodemixin
- the mixin name- Returns:
true
if the mixin was added, orfalse
if it is already present
-
removeMixinType
public boolean removeMixinType(Node node, String mixin)
Description copied from interface:Session
Removes a mixin from a node.It's not possible to remove a mixin coming from the primary type.
- Specified by:
removeMixinType
in interfaceSession
- Parameters:
node
- the nodemixin
- the mixin- Returns:
true
if the mixin was removed, orfalse
if it isn't present or is present on the type or does not exist
-
scroll
public ScrollResult<String> scroll(String query, int batchSize, int keepAliveSeconds)
Description copied from interface:Session
Executes the given query and returns the first batch of results containing id of documents, next batch must be requested within thekeepAliveSeconds
delay.
-
scroll
public ScrollResult<String> scroll(String query, QueryFilter queryFilter, int batchSize, int keepAliveSeconds)
Description copied from interface:Session
Executes the given query and returns the first batch of results containing id of documents, next batch must be requested within thekeepAliveSeconds
delay.
-
scroll
public ScrollResult<String> scroll(String scrollId)
Description copied from interface:Session
Get the next batch of results containing id of documents, thescrollId
is part of the previousScrollResult
response.
-
getChildrenNames
protected Set<String> getChildrenNames(String primaryType, List<String> mixins)
Gets complex children names defined by the primary type and the list of mixins.
-
addChildNode
public Node addChildNode(Node parent, String name, Long pos, String typeName, boolean complexProp)
Description copied from interface:Session
Creates a new child node.- Specified by:
addChildNode
in interfaceSession
- Parameters:
parent
- the parent to which the child is addedname
- the child namepos
- the child position, ornull
typeName
- the child typecomplexProp
- whether this is a complex property (true
) or a regular child (false
)- Returns:
- the new node
-
addChildNode
public Node addChildNode(Serializable id, Node parent, String name, Long pos, String typeName, boolean complexProp)
Description copied from interface:Session
Creates a new child node with given id (used for import).- Specified by:
addChildNode
in interfaceSession
- Parameters:
id
- the idparent
- the parent to which the child is addedname
- the child namepos
- the child position, ornull
typeName
- the child typecomplexProp
- whether this is a complex property (true
) or a regular child (false
)- Returns:
- the new node
-
addNode
protected Node addNode(Serializable id, Serializable parentId, String name, Long pos, String typeName, boolean complexProp)
-
addProxy
public Node addProxy(Serializable targetId, Serializable versionableId, Node parent, String name, Long pos)
Description copied from interface:Session
Creates a proxy for a version node.
-
setProxyTarget
public void setProxyTarget(Node proxy, Serializable targetId)
Description copied from interface:Session
Sets a proxies' target.- Specified by:
setProxyTarget
in interfaceSession
- Parameters:
proxy
- the proxytargetId
- the new target id
-
hasChildNode
public boolean hasChildNode(Node parent, String name, boolean complexProp)
Description copied from interface:Session
Checks if a child node with the given name exists.There are two kinds of children, the regular children documents and the complex properties. The
boolean
complexProp
allows a choice between those.- Specified by:
hasChildNode
in interfaceSession
- Parameters:
parent
- the parent nodename
- the child namecomplexProp
- whether to check complex properties or regular children- Returns:
true
if a child node with that name exists
-
getChildNode
public Node getChildNode(Node parent, String name, boolean complexProp)
Description copied from interface:Session
Gets a child node given its parent and name.- Specified by:
getChildNode
in interfaceSession
- Parameters:
parent
- the parent nodename
- the child namecomplexProp
- whether to check complex properties or regular children- Returns:
- the child node, or
null
is not found
-
hasChildren
public boolean hasChildren(Node parent, boolean complexProp)
Description copied from interface:Session
Checks it a node has children.- Specified by:
hasChildren
in interfaceSession
- Parameters:
parent
- the parent nodecomplexProp
- whether to check complex properties or regular children- Returns:
true
if the parent has children
-
getChildren
public List<Node> getChildren(Node parent, String name, boolean complexProp)
Description copied from interface:Session
Gets the children of a node.- Specified by:
getChildren
in interfaceSession
- Parameters:
parent
- the parent nodename
- the children name to get (for lists of complex properties), ornull
for allcomplexProp
- whether to check complex properties or regular children- Returns:
- the collection of children
-
orderBefore
public void orderBefore(Node parent, Node source, Node dest)
Description copied from interface:Session
Order the given source child node before the destination child node. The source node will be placed before the destination one. If destination isnull
, the source node will be appended at the end of the children list.- Specified by:
orderBefore
in interfaceSession
- Parameters:
parent
- the parent nodesource
- the child node to movedest
- the child node before which to place the source node, ornull
to move at the end
-
move
public Node move(Node source, Node parent, String name)
Description copied from interface:Session
Moves a node to a new location with a new name.A
Session.save()
is automatically done first.
-
copy
public Node copy(Node source, Node parent, String name, Consumer<Node> afterRecordCopy)
Description copied from interface:Session
Copies a node to a new location with a new name.A
Session.save()
is automatically done first.
-
removeNode
public void removeNode(Node node, Consumer<Node> beforeRemove)
Description copied from interface:Session
Removes a node from the storage.This is much more complex than removing a property node (
Session.removePropertyNode(org.nuxeo.ecm.core.storage.sql.Node)
).- Specified by:
removeNode
in interfaceSession
- Parameters:
node
- the node to removebeforeRemove
- a consumer called on nodes of records before they are removed- See Also:
Session.removePropertyNode(org.nuxeo.ecm.core.storage.sql.Node)
-
removePropertyNode
public void removePropertyNode(Node node)
Description copied from interface:Session
Removes a property node from the storage.This is much less complex that removing a generic document node (
Session.removeNode(org.nuxeo.ecm.core.storage.sql.Node)
).- Specified by:
removePropertyNode
in interfaceSession
- Parameters:
node
- the property node to remove- See Also:
Session.removeNode(org.nuxeo.ecm.core.storage.sql.Node)
-
checkIn
public Node checkIn(Node node, String label, String checkinComment)
Description copied from interface:Session
Checks in a checked-out node: creates a new version with a copy of its information.A
Session.save()
is automatically done first.
-
checkOut
public void checkOut(Node node)
Description copied from interface:Session
Checks out a checked-in node.
-
restore
public void restore(Node node, Node version)
Description copied from interface:Session
Restores a node to a given version.The restored node is checked in.
-
getVersionByLabel
public Node getVersionByLabel(Serializable versionSeriesId, String label)
Description copied from interface:Session
Gets a version given its version series id and label.- Specified by:
getVersionByLabel
in interfaceSession
- Parameters:
versionSeriesId
- the version series idlabel
- the label- Returns:
- the version node, or
null
if not found
-
getLastVersion
public Node getLastVersion(Serializable versionSeriesId)
Description copied from interface:Session
Gets the last version for a given version series id.A
Session.save()
is automatically done first.- Specified by:
getLastVersion
in interfaceSession
- Parameters:
versionSeriesId
- the version series id- Returns:
- the last version, or
null
if no versions exist
-
getVersions
public List<Node> getVersions(Serializable versionSeriesId)
Description copied from interface:Session
Gets all the versions for a given version series id.A
Session.save()
is automatically done first.- Specified by:
getVersions
in interfaceSession
- Parameters:
versionSeriesId
- the version series id- Returns:
- the list of versions
-
getProxies
public List<Node> getProxies(Node document, Node parent)
Description copied from interface:Session
Finds the proxies for a document. If the parent is not null, the search will be limited to its direct children.If the document is a version, then only proxies to that version will be looked up.
Otherwise all proxies to the same version series than the document are retrieved.
A
Session.save()
is automatically done first.- Specified by:
getProxies
in interfaceSession
- Parameters:
document
- the documentparent
- the parent, ornull
- Returns:
- the list of proxies
-
getNodes
protected List<Node> getNodes(List<Serializable> ids)
-
getProxies
public List<Node> getProxies(Node document)
Description copied from interface:Session
Finds the proxies for a document. (The document may be a version or a live document)- Specified by:
getProxies
in interfaceSession
- Parameters:
document
- the document- Returns:
- the list of proxies, or an empty list
-
getHierarchyAndAncestors
protected List<Fragment> getHierarchyAndAncestors(Collection<Serializable> ids)
Fetches the hierarchy fragment for the given rows and all their ancestors.- Parameters:
ids
- the fragment ids
-
query
public PartialList<Serializable> query(String query, QueryFilter queryFilter, boolean countTotal)
Description copied from interface:Session
Makes a NXQL query to the database.
-
query
public PartialList<Serializable> query(String query, String queryType, QueryFilter queryFilter, long countUpTo)
Description copied from interface:Session
Makes a query to the database.- Specified by:
query
in interfaceSession
- Parameters:
query
- the queryqueryType
- the query typequeryFilter
- the query filtercountUpTo
- if-1
, also count the total size without offset/limit.
If0
, don't count the total size.
Ifn
, count the total number if there are less than n documents otherwise set the size to-1
.- Returns:
- the resulting list with total size included
-
noteQueryResult
protected void noteQueryResult(IterableQueryResult result)
-
closeQueryResults
protected void closeQueryResults()
-
queryAndFetch
public IterableQueryResult queryAndFetch(String query, String queryType, QueryFilter queryFilter, Object... params)
Description copied from interface:Session
Makes a query to the database and returns an iterable (which must be closed when done).- Specified by:
queryAndFetch
in interfaceSession
- Parameters:
query
- the queryqueryType
- the query typequeryFilter
- the query filterparams
- optional query-type-dependent parameters- Returns:
- an iterable, which must be closed when done
-
queryAndFetch
public IterableQueryResult queryAndFetch(String query, String queryType, QueryFilter queryFilter, boolean distinctDocuments, Object... params)
Description copied from interface:Session
Makes a query to the database and returns an iterable (which must be closed when done).- Specified by:
queryAndFetch
in interfaceSession
- Parameters:
query
- the queryqueryType
- the query typequeryFilter
- the query filterdistinctDocuments
- iftrue
then a maximum of one row per document will be returnedparams
- optional query-type-dependent parameters- Returns:
- an iterable, which must be closed when done
-
queryProjection
public PartialList<Map<String,Serializable>> queryProjection(String query, String queryType, QueryFilter queryFilter, boolean distinctDocuments, long countUpTo, Object... params)
Description copied from interface:Session
Makes a query to the database.- Specified by:
queryProjection
in interfaceSession
- Parameters:
query
- the queryqueryType
- the query typequeryFilter
- the query filterdistinctDocuments
- iftrue
then a maximum of one row per document will be returnedcountUpTo
- if-1
, also count the total size without offset/limit.
If0
, don't count the total size.
Ifn
, count the total number if there are less than n documents otherwise set the size to-1
.params
- optional query-type-dependent parameters- Returns:
- a projection
-
getLockManager
public LockManager getLockManager()
Description copied from interface:Session
Gets the lock manager for this session.- Specified by:
getLockManager
in interfaceSession
- Returns:
- the lock manager
-
requireReadAclsUpdate
public void requireReadAclsUpdate()
Description copied from interface:Session
Read ACLs are optimized ACLs for the read permission, they need to be updated after document creation or ACL change.This method flag the current session, the read ACLs update will be done automatically at save time.
- Specified by:
requireReadAclsUpdate
in interfaceSession
-
updateReadAcls
public void updateReadAcls()
Description copied from interface:Session
Update only the read ACLs that have changed.- Specified by:
updateReadAcls
in interfaceSession
-
rebuildReadAcls
public void rebuildReadAcls()
Description copied from interface:Session
Rebuild the read ACLs for the whole repository.- Specified by:
rebuildReadAcls
in interfaceSession
-
markReferencedBlobs
public void markReferencedBlobs(BiConsumer<String,String> markerCallback)
-
cleanupDeletedDocuments
public int cleanupDeletedDocuments(int max, Calendar beforeTime)
-
start
public void start()
-
end
public void end()
-
commit
public void commit()
-
rollback
public void rollback()
-
getCacheSize
public long getCacheSize()
-
getCacheMapperSize
public long getCacheMapperSize()
-
getCachePristineSize
public long getCachePristineSize()
-
getCacheSelectionSize
public long getCacheSelectionSize()
-
isFulltextStoredInBlob
public boolean isFulltextStoredInBlob()
Description copied from interface:Session
Checks if fulltext extracted from the binary fields is internally stored as a blob.- Specified by:
isFulltextStoredInBlob
in interfaceSession
- Returns:
true
if fulltext from binaries is store as a blob
-
getBinaryFulltext
public Map<String,String> getBinaryFulltext(Serializable id, Document doc)
Description copied from interface:Session
Gets the fulltext extracted from the binary fields.- Specified by:
getBinaryFulltext
in interfaceSession
-
isChangeTokenEnabled
public boolean isChangeTokenEnabled()
Description copied from interface:Session
Checks if change token management is enabled.- Specified by:
isChangeTokenEnabled
in interfaceSession
-
markUserChange
public void markUserChange(Serializable id)
Description copied from interface:Session
Marks the document as being modified by a user change.This causes an additional change token increment and check during save.
- Specified by:
markUserChange
in interfaceSession
- Parameters:
id
- the document id
-
-