@Component public class BatchServiceImpl extends AbstractService implements BatchService
FedoraSession service which is able to
create/commit/rollback FedoraSession objects. A Scheduled
annotation is used for removing timed out operations| Modifier and Type | Field and Description |
|---|---|
static long |
REAP_INTERVAL |
| Constructor and Description |
|---|
BatchServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
abort(String sessionId,
String username)
Roll back any uncommited changes during a
FedoraSession |
void |
begin(FedoraSession session,
String username)
Create a new batch operation with a FedoraSession and add it to the currently open ones
|
void |
commit(String sessionId,
String username)
Commit any changes during a
FedoraSession with the given id and username |
boolean |
exists(String sessionId,
String username)
Check if a FedoraSession exists for a particular user
|
FedoraSession |
getSession(String sessionId,
String username)
Retrieve an open
FedoraSession for a given user |
void |
refresh(String sessionId,
String username)
Refresh an existing session using an implementation-defined default
|
void |
removeExpired()
Every REAP_INTERVAL milliseconds, check for expired sessions.
|
exists, findNode, findOrCreateNodeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitabort, begin, commit, exists, getSessionpublic static final long REAP_INTERVAL
public BatchServiceImpl()
@Scheduled(fixedRate=1000L) public void removeExpired()
removeExpired in interface BatchServicepublic void begin(FedoraSession session, String username)
BatchServicebegin in interface BatchServicesession - The session to use for this batch operationusername - the name of the Principalpublic FedoraSession getSession(String sessionId, String username)
BatchServiceFedoraSession for a given usergetSession in interface BatchServicesessionId - the Id of the FedoraSessionusername - the name of the PrincipalFedoraSession with this userpublic boolean exists(String sessionId, String username)
BatchServiceexists in interface BatchServicesessionId - the Id of the FedoraSessionusername - the name of the PrincipalFedoraSession object for the defined userpublic void commit(String sessionId, String username)
BatchServiceFedoraSession with the given id and usernamecommit in interface BatchServicesessionId - the id of the FedoraSessionusername - the name of the Principalpublic void refresh(String sessionId, String username)
BatchServicerefresh in interface BatchServicesessionId - the Id of the FedoraSessionusername - the name of the Principalpublic void abort(String sessionId, String username)
BatchServiceFedoraSessionabort in interface BatchServicesessionId - the id of the FedoraSessionusername - the name of the PrincipalCopyright © 2013–2019 DuraSpace, Inc.. All rights reserved.