public class ClusterAwareInetAddressCache extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
CLUSTER_MESSAGE_CHANNEL |
protected static String |
CLUSTER_MESSAGE_CLEAR |
Constructor and Description |
---|
ClusterAwareInetAddressCache(com.atlassian.cache.Cache<String,Boolean> cache,
ClusterMessageService clusterMessageService) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the entire cache storing the address permissions.
|
Boolean |
getPermitted(Application application,
InetAddress address)
Gets from cache whether the
application with address is permitted to make a request
to the Crowd server. |
void |
registerClusterListener() |
void |
setPermitted(Application application,
InetAddress address,
boolean permitted)
Sets in the cache that
address is permitted/forbidden from making a request to the Crowd server. |
void |
unregisterClusterListener() |
protected static final String CLUSTER_MESSAGE_CHANNEL
protected static final String CLUSTER_MESSAGE_CLEAR
public ClusterAwareInetAddressCache(com.atlassian.cache.Cache<String,Boolean> cache, ClusterMessageService clusterMessageService)
@PostConstruct public void registerClusterListener()
@PreDestroy public void unregisterClusterListener()
public void setPermitted(Application application, InetAddress address, boolean permitted)
address
is permitted/forbidden from making a request to the Crowd server.application
- application that is requesting the connection.address
- InetAddress to setpermitted
- whether address
is permitted or forbidden to make a request.@Nullable public Boolean getPermitted(Application application, InetAddress address)
application
with address
is permitted to make a request
to the Crowd server.application
- Application making the request.address
- address of the client making the request.application
with address
is permitted to make a request, or null
if unknownpublic void clear()
Copyright © 2021 Atlassian. All rights reserved.