public class DefaultHeartbeatManager extends Object implements HeartbeatManager
Constructor and Description |
---|
DefaultHeartbeatManager(com.atlassian.vcache.VCacheFactory cacheFactory,
UserAccessor userAccessor) |
Modifier and Type | Method and Description |
---|---|
long |
getHeartbeatInterval()
Fetches the time at which activities will expire
|
List<com.atlassian.user.User> |
getUsersForActivity(String activityKey)
Fetches a list of users who are participating in a specified activity
|
void |
startActivity(String activityKey,
String username)
Adds a username as an active participant to the specified activity
|
void |
startActivity(String activityKey,
com.atlassian.user.User user)
Adds a username as an active participant to the specified activity
|
void |
stopActivity(String activityKey,
String username)
Remove a username from the active participants from the specified activity
|
void |
stopActivity(String activityKey,
com.atlassian.user.User user)
Remove a user from the active participants from the specified activity
|
public DefaultHeartbeatManager(com.atlassian.vcache.VCacheFactory cacheFactory, UserAccessor userAccessor)
public long getHeartbeatInterval()
HeartbeatManager
getHeartbeatInterval
in interface HeartbeatManager
public List<com.atlassian.user.User> getUsersForActivity(String activityKey)
HeartbeatManager
getUsersForActivity
in interface HeartbeatManager
activityKey
- The key used to identify the activitypublic void startActivity(String activityKey, String username)
HeartbeatManager
startActivity
in interface HeartbeatManager
activityKey
- The key used to identify the activityusername
- The username of the user who is participating in the activitypublic void startActivity(String activityKey, com.atlassian.user.User user)
HeartbeatManager
startActivity
in interface HeartbeatManager
activityKey
- The key used to identify the activityuser
- The user who is participating in the activitypublic void stopActivity(String activityKey, String username)
HeartbeatManager
stopActivity
in interface HeartbeatManager
activityKey
- The key used to identify the activityusername
- The username of the user who is participating in the activitypublic void stopActivity(String activityKey, com.atlassian.user.User user)
HeartbeatManager
stopActivity
in interface HeartbeatManager
activityKey
- The key used to identify the activityuser
- The user who is participating in the activityCopyright © 2003–2017 Atlassian. All rights reserved.