Class DefaultHeartbeatManager
java.lang.Object
com.atlassian.confluence.impl.health.DefaultHeartbeatManager
- All Implemented Interfaces:
HeartbeatManager
- Since:
- 8.0
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.atlassian.confluence.core.HeartbeatManager
HeartbeatManager.ActivityKey
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultHeartbeatManager
(DefaultHeartbeatManager.DataStore<com.atlassian.confluence.impl.health.DefaultHeartbeatManager.CacheData> dataStore, ConfluenceUserResolver userResolver) DefaultHeartbeatManager
(com.atlassian.vcache.VCacheFactory cacheFactory, ConfluenceUserResolver userResolver) Deprecated, for removal: This API element is subject to removal in a future version.since 9.4 -
Method Summary
Modifier and TypeMethodDescriptionlong
Fetches the time at which activities will expireSet<com.atlassian.sal.api.user.UserKey>
Fetches a list of users who are participating in a specified activityList<com.atlassian.user.User>
getUsersForActivity
(String activityKey) Fetches a list of users who are participating in a specified activityvoid
startActivity
(String activityKey, com.atlassian.user.User user) Adds a username as an active participant to the specified activityvoid
startActivity
(String activityKey, String username) Adds a username as an active participant to the specified activityvoid
stopActivity
(String activityKey, com.atlassian.user.User user) Remove a user from the active participants from the specified activityvoid
stopActivity
(String activityKey, String username) Remove a username from the active participants from the specified activityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.confluence.core.HeartbeatManager
countUsersForActivity, startActivity, stopActivity
-
Constructor Details
-
DefaultHeartbeatManager
public DefaultHeartbeatManager(DefaultHeartbeatManager.DataStore<com.atlassian.confluence.impl.health.DefaultHeartbeatManager.CacheData> dataStore, ConfluenceUserResolver userResolver) - Since:
- 9.4
-
DefaultHeartbeatManager
@Deprecated(forRemoval=true, since="9.4") public DefaultHeartbeatManager(com.atlassian.vcache.VCacheFactory cacheFactory, ConfluenceUserResolver userResolver) Deprecated, for removal: This API element is subject to removal in a future version.since 9.4- Since:
- 7.17
-
-
Method Details
-
getHeartbeatInterval
public long getHeartbeatInterval()Description copied from interface:HeartbeatManager
Fetches the time at which activities will expire- Specified by:
getHeartbeatInterval
in interfaceHeartbeatManager
- Returns:
- The activity timeout in milliseconds
-
getUsersForActivity
Description copied from interface:HeartbeatManager
Fetches a list of users who are participating in a specified activity- Specified by:
getUsersForActivity
in interfaceHeartbeatManager
- Parameters:
activityKey
- The key used to identify the activity- Returns:
- A list of users who are actively engaging in the specified activity
-
getUserKeysForActivity
public Set<com.atlassian.sal.api.user.UserKey> getUserKeysForActivity(HeartbeatManager.ActivityKey activity) Description copied from interface:HeartbeatManager
Fetches a list of users who are participating in a specified activity- Specified by:
getUserKeysForActivity
in interfaceHeartbeatManager
- Parameters:
activity
- The key used to identify the activity- Returns:
- A list of users who are actively engaging in the specified activity
-
startActivity
Description copied from interface:HeartbeatManager
Adds a username as an active participant to the specified activity- Specified by:
startActivity
in interfaceHeartbeatManager
- Parameters:
activityKey
- The key used to identify the activityusername
- The username of the user who is participating in the activity
-
startActivity
Description copied from interface:HeartbeatManager
Adds a username as an active participant to the specified activity- Specified by:
startActivity
in interfaceHeartbeatManager
- Parameters:
activityKey
- The key used to identify the activityuser
- The user who is participating in the activity
-
stopActivity
Description copied from interface:HeartbeatManager
Remove a username from the active participants from the specified activity- Specified by:
stopActivity
in interfaceHeartbeatManager
- Parameters:
activityKey
- The key used to identify the activityusername
- The username of the user who is participating in the activity
-
stopActivity
Description copied from interface:HeartbeatManager
Remove a user from the active participants from the specified activity- Specified by:
stopActivity
in interfaceHeartbeatManager
- Parameters:
activityKey
- The key used to identify the activityuser
- The user who is participating in the activity
-