Class ServerContextCache
java.lang.Object
org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache
org.gcube.informationsystem.resourceregistry.contexts.ServerContextCache
public class ServerContextCache
extends org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache
- Author:
- Luca Frosini (ISTI - CNR) TODO find a distributed solution
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<org.gcube.informationsystem.contexts.reference.entities.Context>protected List<org.gcube.informationsystem.contexts.reference.entities.Context>protected booleanprotected static ServerContextCacheFields inherited from class org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache
contextCacheRenewal, contextFullNameToUUID, contexts, contextsTree, creationTime, DEFAULT_EXPIRING_TIMEOUT, expiringTime, expiringTimeout, initialized, uuidToContext, uuidToContextFullName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidcleanCache(Calendar now) org.gcube.informationsystem.contexts.reference.entities.ContextgetContextByUUID(UUID uuid) org.gcube.informationsystem.contexts.reference.entities.ContextgetContextByUUIDFullInfo(UUID uuid) USer internally to the service to get info such as stateList<org.gcube.informationsystem.contexts.reference.entities.Context>org.gcube.informationsystem.contexts.reference.entities.ContextgetFullInfoContextByUUID(UUID uuid) List<org.gcube.informationsystem.contexts.reference.entities.Context>static ServerContextCacheprotected org.gcube.informationsystem.model.reference.properties.MetadatagetMetadataForPrivacy(org.gcube.com.fasterxml.jackson.databind.ObjectMapper objectMapper, org.gcube.informationsystem.model.reference.properties.Metadata metadata) voidbooleanprotected voidsetContexts(Calendar calendar, List<org.gcube.informationsystem.contexts.reference.entities.Context> contexts) voidsetIncludeMeta(boolean includeMeta) Methods inherited from class org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache
getContextByFullName, getContextByUUID, getContextCacheRenewal, getContextFullName, getContextFullNameByUUID, getContextFullNameByUUID, getContextFullNameToUUIDAssociation, getContextsTree, getUUIDByFullName, getUUIDToContextFullNameAssociation, refreshContextsIfNeeded, renew, setContextCacheRenewal, setContexts, setExpiringTimeout
-
Field Details
-
contextsMetaPrivacy
-
uuidToContextMetaPrivacy
-
contextsBasicInfo
-
uuidToContextBasicInfo
-
includeMeta
protected boolean includeMeta -
singleton
-
-
Constructor Details
-
ServerContextCache
public ServerContextCache()
-
-
Method Details
-
getInstance
-
cleanCache
public void cleanCache()- Overrides:
cleanCachein classorg.gcube.informationsystem.resourceregistry.api.contexts.ContextCache
-
cleanCache
- Overrides:
cleanCachein classorg.gcube.informationsystem.resourceregistry.api.contexts.ContextCache
-
isIncludeMeta
public boolean isIncludeMeta() -
setIncludeMeta
public void setIncludeMeta(boolean includeMeta) -
initContextCacheRenewal
public void initContextCacheRenewal() -
getContexts
public List<org.gcube.informationsystem.contexts.reference.entities.Context> getContexts() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- Overrides:
getContextsin classorg.gcube.informationsystem.resourceregistry.api.contexts.ContextCache- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getFullInfoContexts
public List<org.gcube.informationsystem.contexts.reference.entities.Context> getFullInfoContexts() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getFullInfoContextByUUID
public org.gcube.informationsystem.contexts.reference.entities.Context getFullInfoContextByUUID(UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getContextByUUID
public org.gcube.informationsystem.contexts.reference.entities.Context getContextByUUID(UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - Overrides:
getContextByUUIDin classorg.gcube.informationsystem.resourceregistry.api.contexts.ContextCache- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getContextByUUIDFullInfo
public org.gcube.informationsystem.contexts.reference.entities.Context getContextByUUIDFullInfo(UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException USer internally to the service to get info such as state- Parameters:
uuid-- Returns:
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getMetadataForPrivacy
protected org.gcube.informationsystem.model.reference.properties.Metadata getMetadataForPrivacy(org.gcube.com.fasterxml.jackson.databind.ObjectMapper objectMapper, org.gcube.informationsystem.model.reference.properties.Metadata metadata) -
setContexts
protected void setContexts(Calendar calendar, List<org.gcube.informationsystem.contexts.reference.entities.Context> contexts) - Overrides:
setContextsin classorg.gcube.informationsystem.resourceregistry.api.contexts.ContextCache
-