public class ContextCache extends Object
| Modifier and Type | Field and Description |
|---|---|
protected ContextCacheRenewal |
contextCacheRenewal |
protected Map<String,UUID> |
contextFullNameToUUID |
protected List<org.gcube.informationsystem.context.reference.entities.Context> |
contexts |
protected Calendar |
creationTime |
static long |
DEFAULT_EXPIRING_TIMEOUT |
protected Calendar |
expiringTime |
static int |
expiringTimeout |
protected static ContextCache |
singleton |
protected Map<UUID,org.gcube.informationsystem.context.reference.entities.Context> |
uuidToContext |
protected Map<UUID,String> |
uuidToContextFullName |
| Constructor and Description |
|---|
ContextCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanCache() |
org.gcube.informationsystem.context.reference.entities.Context |
getContextByFullName(String contextFullName) |
org.gcube.informationsystem.context.reference.entities.Context |
getContextByUUID(String uuid) |
org.gcube.informationsystem.context.reference.entities.Context |
getContextByUUID(UUID uuid) |
String |
getContextFullNameByUUID(String uuid) |
String |
getContextFullNameByUUID(UUID uuid) |
Map<String,UUID> |
getContextFullNameToUUIDAssociation() |
List<org.gcube.informationsystem.context.reference.entities.Context> |
getContexts() |
static ContextCache |
getInstance() |
UUID |
getUUIDByFullName(String contextFullName) |
Map<UUID,String> |
getUUIDToContextFullNameAssociation() |
void |
refreshContextsIfNeeded() |
void |
setContextCacheRenewal(ContextCacheRenewal contextCacheRenewal) |
static void |
setExpiringTimeout(int expiringTimeout) |
public static final long DEFAULT_EXPIRING_TIMEOUT
public static int expiringTimeout
protected static ContextCache singleton
protected ContextCacheRenewal contextCacheRenewal
protected Calendar creationTime
protected Calendar expiringTime
protected List<org.gcube.informationsystem.context.reference.entities.Context> contexts
protected Map<UUID,org.gcube.informationsystem.context.reference.entities.Context> uuidToContext
public static void setExpiringTimeout(int expiringTimeout)
public static ContextCache getInstance()
public void cleanCache()
public void setContextCacheRenewal(ContextCacheRenewal contextCacheRenewal)
public void refreshContextsIfNeeded()
throws ResourceRegistryException
ResourceRegistryExceptionpublic List<org.gcube.informationsystem.context.reference.entities.Context> getContexts() throws ResourceRegistryException
ResourceRegistryExceptionpublic String getContextFullNameByUUID(UUID uuid) throws ResourceRegistryException
ResourceRegistryExceptionpublic String getContextFullNameByUUID(String uuid) throws ResourceRegistryException
ResourceRegistryExceptionpublic UUID getUUIDByFullName(String contextFullName) throws ResourceRegistryException
ResourceRegistryExceptionpublic org.gcube.informationsystem.context.reference.entities.Context getContextByUUID(UUID uuid) throws ResourceRegistryException
ResourceRegistryExceptionpublic org.gcube.informationsystem.context.reference.entities.Context getContextByUUID(String uuid) throws ResourceRegistryException
ResourceRegistryExceptionpublic org.gcube.informationsystem.context.reference.entities.Context getContextByFullName(String contextFullName) throws ResourceRegistryException
ResourceRegistryExceptionpublic Map<UUID,String> getUUIDToContextFullNameAssociation() throws ResourceRegistryException
ResourceRegistryExceptionpublic Map<String,UUID> getContextFullNameToUUIDAssociation() throws ResourceRegistryException
ResourceRegistryExceptionCopyright © 2021. All Rights Reserved.