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

    Fields
    Modifier and Type
    Field
    Description
    protected List<org.gcube.informationsystem.contexts.reference.entities.Context>
     
    protected List<org.gcube.informationsystem.contexts.reference.entities.Context>
     
    protected boolean
     
    protected static ServerContextCache
     
    protected Map<UUID,org.gcube.informationsystem.contexts.reference.entities.Context>
     
    protected Map<UUID,org.gcube.informationsystem.contexts.reference.entities.Context>
     

    Fields 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected void
     
    org.gcube.informationsystem.contexts.reference.entities.Context
     
    org.gcube.informationsystem.contexts.reference.entities.Context
    USer internally to the service to get info such as state
    List<org.gcube.informationsystem.contexts.reference.entities.Context>
     
    org.gcube.informationsystem.contexts.reference.entities.Context
     
    List<org.gcube.informationsystem.contexts.reference.entities.Context>
     
     
    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)
     
    void
     
    boolean
     
    protected void
    setContexts(Calendar calendar, List<org.gcube.informationsystem.contexts.reference.entities.Context> contexts)
     
    void
    setIncludeMeta(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • contextsMetaPrivacy

      protected List<org.gcube.informationsystem.contexts.reference.entities.Context> contextsMetaPrivacy
    • uuidToContextMetaPrivacy

      protected Map<UUID,org.gcube.informationsystem.contexts.reference.entities.Context> uuidToContextMetaPrivacy
    • contextsBasicInfo

      protected List<org.gcube.informationsystem.contexts.reference.entities.Context> contextsBasicInfo
    • uuidToContextBasicInfo

      protected Map<UUID,org.gcube.informationsystem.contexts.reference.entities.Context> uuidToContextBasicInfo
    • includeMeta

      protected boolean includeMeta
    • singleton

      protected static ServerContextCache singleton
  • Constructor Details

    • ServerContextCache

      public ServerContextCache()
  • Method Details

    • getInstance

      public static ServerContextCache getInstance()
    • cleanCache

      public void cleanCache()
      Overrides:
      cleanCache in class org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache
    • cleanCache

      protected void cleanCache(Calendar now)
      Overrides:
      cleanCache in class org.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:
      getContexts in class org.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:
      getContextByUUID in class org.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:
      setContexts in class org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache