public class CacheKey extends Object
Modifier and Type | Method and Description |
---|---|
CacheKey |
append(CacheKey other,
Object... objects)
Appends the given CacheKey to this instance.
|
CacheKey |
append(Object object,
Object... objects)
Appends the given Objects to this instance.
|
boolean |
equals(Object o) |
ArrayList<Object> |
getComponents() |
com.google.common.base.Optional<String> |
getTenantId() |
com.google.common.base.Optional<String> |
getUserName() |
int |
hashCode() |
static CacheKey |
newGlobalKey() |
static CacheKey |
newGlobalKey(CacheKey cacheKey)
Converts the given CacheKey to a globally visible CacheKey.
|
static CacheKey |
newTenantIsolatedKey() |
static CacheKey |
newTenantIsolatedKey(CacheKey cacheKey) |
static CacheKey |
newTenantIsolatedKey(CacheKey cacheKey,
String tenantId)
Converts the given CacheKey to a tenant-isolated CacheKey.
|
static CacheKey |
newTenantIsolatedKey(String tenantId) |
static CacheKey |
newUserIsolatedKey() |
static CacheKey |
newUserIsolatedKey(CacheKey cacheKey) |
static CacheKey |
newUserIsolatedKey(CacheKey cacheKey,
String userName) |
static CacheKey |
newUserIsolatedKey(CacheKey cacheKey,
String tenantId,
String userName)
Converts the given CacheKey to a tenant-isolated CacheKey.
|
static CacheKey |
newUserIsolatedKey(String userName) |
static CacheKey |
newUserIsolatedKey(String tenantId,
String userName) |
String |
toString() |
public com.google.common.base.Optional<String> getTenantId()
public com.google.common.base.Optional<String> getUserName()
public CacheKey append(CacheKey other, Object... objects) throws IllegalArgumentException, UnmergeableCacheKeyException
IllegalArgumentException
- If the given CacheKey is null.UnmergeableCacheKeyException
- If the tenant or user in the isolation level of the given CacheKey is different from the respective
tenant or user in this CacheKey.public CacheKey append(@Nullable Object object, Object... objects)
public static CacheKey newGlobalKey(CacheKey cacheKey) throws IllegalArgumentException
IllegalArgumentException
- If the given CacheKey is null.public static CacheKey newGlobalKey()
public static CacheKey newTenantIsolatedKey(String tenantId) throws IllegalArgumentException
IllegalArgumentException
- If the given tenant is null.public static CacheKey newTenantIsolatedKey() throws IllegalArgumentException
IllegalArgumentException
newTenantIsolatedKey(String)
public static CacheKey newTenantIsolatedKey(CacheKey cacheKey, String tenantId) throws IllegalArgumentException
IllegalArgumentException
- If the given CacheKey or tenant is null.public static CacheKey newTenantIsolatedKey(CacheKey cacheKey) throws IllegalArgumentException
IllegalArgumentException
newTenantIsolatedKey(CacheKey, String)
public static CacheKey newUserIsolatedKey(String tenantId, String userName) throws IllegalArgumentException
IllegalArgumentException
- If the given tenant or user is null.public static CacheKey newUserIsolatedKey(String userName) throws IllegalArgumentException
IllegalArgumentException
newUserIsolatedKey(String, String)
public static CacheKey newUserIsolatedKey()
newUserIsolatedKey(String, String)
public static CacheKey newUserIsolatedKey(CacheKey cacheKey, String tenantId, String userName) throws IllegalArgumentException
IllegalArgumentException
- If the given CacheKey, tenant, or user is null.public static CacheKey newUserIsolatedKey(CacheKey cacheKey, String userName) throws IllegalArgumentException
IllegalArgumentException
newUserIsolatedKey(CacheKey, String, String)
public static CacheKey newUserIsolatedKey(CacheKey cacheKey) throws IllegalArgumentException
IllegalArgumentException
newUserIsolatedKey(CacheKey, String, String)
@Generated(value="lombok") public boolean equals(Object o)
@Generated(value="lombok") public int hashCode()
@Generated(value="lombok") public String toString()
@Generated(value="lombok") public ArrayList<Object> getComponents()
Copyright © 2017 SAP SE. All rights reserved.