public class DefaultUserCache extends java.lang.Object implements SymUserCache
This subsystem utilizes Ignite Cache services
Constructor and Description |
---|
DefaultUserCache(SymphonyClient symClient)
DefaultUserCache implements symuser caches by id, email, name and streams
|
Modifier and Type | Method and Description |
---|---|
CacheType |
getCacheType()
Return cache type.
|
SymUser |
getUserByEmail(java.lang.String email)
Retrieve user by user email
|
SymUser |
getUserById(java.lang.Long uid)
Retrieve user by UID
|
SymUser |
getUserByName(java.lang.String name)
Retrieve user by user name
|
java.util.Set<SymUser> |
getUsersByStream(java.lang.String streamId)
Retrieve users by S
|
void |
setCacheType(CacheType cacheType)
THIS IS IGNORED
|
void |
setSymphonyClient(SymphonyClient symphonyClient)
Set the SymphonyClient used for underlying calls.
|
public DefaultUserCache(SymphonyClient symClient)
This cache can be replaced with a custom cache plugin. Please set in SymphonyClient setCache(SymCache)
symClient
- SymphonyClient required to call underlying client implementations and retrieve data.public void setSymphonyClient(SymphonyClient symphonyClient)
setSymphonyClient
in interface SymUserCache
symphonyClient
- SymphonyClientpublic SymUser getUserById(java.lang.Long uid) throws UsersClientException
getUserById
in interface SymUserCache
uid
- Id of userUsersClientException
- Exceptions from underlying API'spublic SymUser getUserByName(java.lang.String name) throws UsersClientException
getUserByName
in interface SymUserCache
name
- Name of userUsersClientException
- Exception from underlying API'spublic java.util.Set<SymUser> getUsersByStream(java.lang.String streamId) throws UsersClientException
getUsersByStream
in interface SymUserCache
streamId
- StreamID that users are part ofUsersClientException
- Exceptions from underlying API calls.public SymUser getUserByEmail(java.lang.String email) throws UsersClientException
getUserByEmail
in interface SymUserCache
email
- email of userUsersClientException
- Exception from underlying API'spublic CacheType getCacheType()
getCacheType
in interface SymCache
public void setCacheType(CacheType cacheType)
setCacheType
in interface SymCache
cacheType
- type of cache eg. USER