org.olat.core.util.coordinate
Interface Coordinator

All Known Implementing Classes:
ClusterCoordinator, SingleVMCoordinator

public interface Coordinator

Description:
Serves as a facade for all coordinated-related services such as Syncer (synchronizing access), Locker (locking), Cacher (caching) and the eventbus (application-wide events)

Initial Date: 17.09.2007

Author:
Felix Jost

Method Summary
 EventBus createSingleUserInstance()
          do -not- call normally, reserved for internal calls
 Cacher getCacher()
           
 EventBus getEventBus()
           
 Locker getLocker()
           
 java.lang.Integer getNodeId()
          Deprecated. if you really need the node id try to access it via spring. Search the spring files for ${node.id} for an example. Calling this method depends on a fully loaded OLAT and this is not what you want when doing unit testing without OLAT. If you like to have a service which only runs on one node there is a concept called singleton services. See the UpgradeManager spring config for an example.
 Syncer getSyncer()
           
 boolean isClusterMode()
           
 

Method Detail

getSyncer

Syncer getSyncer()
Returns:
the Syncer (synchronizing access to resources)

getEventBus

EventBus getEventBus()
Returns:
the event bus (sending application-wide events)

getLocker

Locker getLocker()
Returns:
the Locker (locking facility)

getCacher

Cacher getCacher()
Returns:
the Cacher (for caching)

createSingleUserInstance

EventBus createSingleUserInstance()
do -not- call normally, reserved for internal calls

Returns:

getNodeId

java.lang.Integer getNodeId()
Deprecated. if you really need the node id try to access it via spring. Search the spring files for ${node.id} for an example. Calling this method depends on a fully loaded OLAT and this is not what you want when doing unit testing without OLAT. If you like to have a service which only runs on one node there is a concept called singleton services. See the UpgradeManager spring config for an example.

Returns:
Node ID of certain cluster-node, in case of single-VM return always the same id

isClusterMode

boolean isClusterMode()
Returns:
true if OLAT runs in cluster mode