Class SharedCacheHeartbeatManager
java.lang.Object
com.atlassian.confluence.impl.health.SharedCacheHeartbeatManager
- All Implemented Interfaces:
HeartbeatManager
An implementation of
HeartbeatManager backed by a Cache, using an optimisitic-update-and-retry algorithm
to handle conflicts.- Since:
- 10.0
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.atlassian.confluence.core.HeartbeatManager
HeartbeatManager.ActivityKey -
Method Summary
Modifier and TypeMethodDescriptionlongFetches 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 activityvoidstartActivity(String activityKey, com.atlassian.user.User user) Adds a username as an active participant to the specified activityvoidstartActivity(String activityKey, String username) Adds a username as an active participant to the specified activityvoidstopActivity(String activityKey, com.atlassian.user.User user) Remove a user from the active participants from the specified activityvoidstopActivity(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, waitMethods inherited from interface com.atlassian.confluence.core.HeartbeatManager
countUsersForActivity, startActivity, stopActivity
-
Method Details
-
getHeartbeatInterval
public long getHeartbeatInterval()Description copied from interface:HeartbeatManagerFetches the time at which activities will expire- Specified by:
getHeartbeatIntervalin interfaceHeartbeatManager- Returns:
- The activity timeout in milliseconds
-
getUsersForActivity
Description copied from interface:HeartbeatManagerFetches a list of users who are participating in a specified activity- Specified by:
getUsersForActivityin 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:HeartbeatManagerFetches a list of users who are participating in a specified activity- Specified by:
getUserKeysForActivityin 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:HeartbeatManagerAdds a username as an active participant to the specified activity- Specified by:
startActivityin 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:HeartbeatManagerAdds a username as an active participant to the specified activity- Specified by:
startActivityin interfaceHeartbeatManager- Parameters:
activityKey- The key used to identify the activityuser- The user who is participating in the activity
-
stopActivity
Description copied from interface:HeartbeatManagerRemove a username from the active participants from the specified activity- Specified by:
stopActivityin 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:HeartbeatManagerRemove a user from the active participants from the specified activity- Specified by:
stopActivityin interfaceHeartbeatManager- Parameters:
activityKey- The key used to identify the activityuser- The user who is participating in the activity
-