|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.modeshape.jboss.managed.ManagedEngine
@Immutable public final class ManagedEngine
A ManagedEngine
instance is a JBoss managed object for a
JcrEngine
.
Nested Class Summary | |
---|---|
static class |
ManagedEngine.Component
|
static class |
ManagedEngine.ManagedProperty
|
Constructor Summary | |
---|---|
ManagedEngine()
|
|
ManagedEngine(JcrEngine engine)
Creates a JBoss managed object from the specified engine. |
Method Summary | |
---|---|
long |
getActiveSessions(String repositoryName)
Get the number of sessions currently active |
RepositorySource |
getConnector(String connectorName)
Obtains a connector by name. |
Collection<ManagedConnector> |
getConnectors()
Obtains the managed connectors of this engine. |
protected JcrEngine |
getEngine()
A utility method that must be used by all non-synchronized methods to access the engine. |
long |
getInUseConnections(String connectorName)
Get the number of connections currently in use |
List<ManagedEngine.ManagedProperty> |
getProperties(String objectName,
ManagedEngine.Component objectType)
Obtains the properties for the passed in object. |
int |
getQueryActivity()
|
Collection<ManagedRepository> |
getRepositories()
Obtains the managed repositories of this engine. |
JcrRepository |
getRepository(String repositoryName)
Obtains the specified managed repository of this engine. |
List<ManagedEngine.ManagedProperty> |
getRepositoryProperties(String repositoryName)
Obtains the managed sequencing service. |
String |
getRepositoryVersion(String repositoryName)
Obtains the JCR version supported by this repository. |
int |
getSaveActivity()
|
org.modeshape.repository.sequencer.SequencingService |
getSequencingService()
Obtains the managed sequencing service. |
Object |
getSessionActivity()
|
String |
getVersion()
Obtains the version (build number) of this ModeShape instance. |
boolean |
isRunning()
Indicates if the managed engine is running. |
List<ManagedLock> |
listLocks()
Obtains all the repository locks sorted by owner. |
List<ManagedLock> |
listLocks(Comparator<ManagedLock> lockSorter)
Obtains all the repository locks sorted by the specified sorter. |
List<ManagedSession> |
listSessions()
Obtains all the repository sessions sorted by user name. |
List<ManagedSession> |
listSessions(Comparator<ManagedSession> sessionSorter)
Obtains all the repository sessions sorted by the specified sorter. |
protected void |
loadConfigurationAndCreateEngine()
|
boolean |
pingConnector(String connectorName)
Pings a connector by name. |
boolean |
removeLock(String lockId)
Removes the lock with the specified identifier. |
void |
restart()
First shutdowns the engine and then starts it back up again. |
void |
setConfigURL(URL configurationUrl)
|
void |
shutdown()
Performs an engine shutdown. |
void |
start()
Starts the engine. |
boolean |
terminateSession(String sessionId)
Terminates the session with the specified identifier. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ManagedEngine()
public ManagedEngine(JcrEngine engine)
engine
- the engine being managed (never null
)Method Detail |
---|
public void setConfigURL(URL configurationUrl) throws Exception
Exception
protected void loadConfigurationAndCreateEngine() throws Exception
Exception
protected JcrEngine getEngine()
public void start()
JcrEngine.start()
public boolean isRunning()
true
if the engine is runningpublic void restart() throws Exception
shutdowns
the engine and then starts
it back up again. This is a JBoss managed operation.
Exception
- if there is a problem restarting the engine (usually reading
the configuration file)shutdown()
,
start()
public void shutdown()
ModeShapeEngine.shutdown()
public Collection<ManagedConnector> getConnectors()
null
)public long getInUseConnections(String connectorName)
connectorName
-
public long getActiveSessions(String repositoryName)
repositoryName
-
public List<ManagedEngine.ManagedProperty> getProperties(String objectName, ManagedEngine.Component objectType)
objectName
- objectType
-
null
)public Collection<ManagedRepository> getRepositories()
null
)public JcrRepository getRepository(String repositoryName)
repositoryName
- for the repository to be returned
null
if repository doesn't existpublic String getRepositoryVersion(String repositoryName)
repositoryName
- (never null
)
null
)public int getQueryActivity()
public int getSaveActivity()
public Object getSessionActivity()
public List<ManagedLock> listLocks()
null
)public List<ManagedLock> listLocks(Comparator<ManagedLock> lockSorter)
lockSorter
- the lock sorter (never null
)
null
)public List<ManagedSession> listSessions()
null
)public List<ManagedSession> listSessions(Comparator<ManagedSession> sessionSorter)
sessionSorter
- the session sorter (never null
)
null
)public boolean removeLock(String lockId)
lockId
- the lock's identifier
true
if the lock was removedpublic boolean terminateSession(String sessionId)
sessionId
- the session's identifier
true
if the session was terminatedpublic RepositorySource getConnector(String connectorName)
connectorName
-
null
)public boolean pingConnector(String connectorName)
connectorName
-
null
)public org.modeshape.repository.sequencer.SequencingService getSequencingService()
null
if never startedpublic List<ManagedEngine.ManagedProperty> getRepositoryProperties(String repositoryName)
repositoryName
-
null
if never startedpublic String getVersion()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |