public class InetAddressCacheUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
INET_ADDRESS_CACHE_NAME |
| Constructor and Description |
|---|
InetAddressCacheUtil(com.atlassian.cache.Cache<String,Boolean> cache) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearCache()
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 |
setPermitted(Application application,
InetAddress address,
boolean permitted)
Sets in the cache that
address is permitted/forbidden from making a request to the Crowd server. |
public static final String INET_ADDRESS_CACHE_NAME
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 clearCache()
Copyright © 2016 Atlassian. All rights reserved.