public class CoordinatorPollingBasicAuthorizerCacheManager extends Object implements BasicAuthorizerCacheManager
| Constructor and Description |
|---|
CoordinatorPollingBasicAuthorizerCacheManager(com.google.inject.Injector injector,
BasicAuthCommonCacheConfig commonCacheConfig,
com.fasterxml.jackson.databind.ObjectMapper objectMapper,
DruidLeaderClient druidLeaderClient) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,BasicAuthorizerRole> |
getRoleMap(String authorizerPrefix)
Return the cache manager's local view of the role map for the authorizer named `authorizerPrefix`.
|
Map<String,BasicAuthorizerUser> |
getUserMap(String authorizerPrefix)
Return the cache manager's local view of the user map for the authorizer named `authorizerPrefix`.
|
void |
handleAuthorizerUpdate(String authorizerPrefix,
byte[] serializedUserAndRoleMap)
Update this cache manager's local state with fresh information pushed by the coordinator.
|
void |
start() |
void |
stop() |
@Inject
public CoordinatorPollingBasicAuthorizerCacheManager(com.google.inject.Injector injector,
BasicAuthCommonCacheConfig commonCacheConfig,
com.fasterxml.jackson.databind.ObjectMapper objectMapper,
DruidLeaderClient druidLeaderClient)
public void start()
public void stop()
public void handleAuthorizerUpdate(String authorizerPrefix, byte[] serializedUserAndRoleMap)
BasicAuthorizerCacheManagerhandleAuthorizerUpdate in interface BasicAuthorizerCacheManagerauthorizerPrefix - The name of the authorizer this update applies to.serializedUserAndRoleMap - The updated, serialized user and role mapspublic Map<String,BasicAuthorizerUser> getUserMap(String authorizerPrefix)
BasicAuthorizerCacheManagergetUserMap in interface BasicAuthorizerCacheManagerauthorizerPrefix - The name of the authorizerpublic Map<String,BasicAuthorizerRole> getRoleMap(String authorizerPrefix)
BasicAuthorizerCacheManagergetRoleMap in interface BasicAuthorizerCacheManagerauthorizerPrefix - The name of the authorizerCopyright © 2011–2018. All rights reserved.