Class SCCacheMetaEntry

java.lang.Object
org.serviceconnector.cache.SCCacheMetaEntry
All Implemented Interfaces:
Serializable

public class SCCacheMetaEntry extends Object implements Serializable
The Class SCCacheMetaEntry. The cache meta entry instances are stored in META_DATA_CACHE. It represents either a single message or a group of part messages they belong to a large response. Meta entries are identified by the cache id. SCMPMessages in DATA_CACHE are identified by cacheId/partnNr. The meta entry controls the state of the message. Loading means storing the message in cache has started but is not completed yet. Meta entry count number of parts, saves loading session id and lots of other meta data. The state Loading marks a message to be ready for delivery out of the cache.
See Also:
  • Constructor Details

    • SCCacheMetaEntry

      public SCCacheMetaEntry(String cacheId)
      Instantiates a new cache meta entry.
      Parameters:
      cacheId - the cache id
    • SCCacheMetaEntry

      public SCCacheMetaEntry(SCCacheMetaEntry toCopyObject)
      Instantiates a new meta entry. Copy constructor. Make a copy of given object.
      Parameters:
      toCopyObject - the object to be copied
  • Method Details

    • getCacheId

      public String getCacheId()
      Gets the cache id.
      Returns:
      the cache id
    • getLoadingSessionId

      public String getLoadingSessionId()
      Gets the loading session id.
      Returns:
      the loading session id
    • setLoadingSessionId

      public void setLoadingSessionId(String loadingSessionId)
      Sets the loading session id.
      Parameters:
      loadingSessionId - the new loading session id
    • isLoadingSessionId

      public boolean isLoadingSessionId(String sessionId)
      Checks if is loading session id.
      Parameters:
      sessionId - the session id
      Returns:
      true, if is loading session id
    • setCacheEntryState

      public void setCacheEntryState(SC_CACHE_ENTRY_STATE cacheEntryState)
      Sets the cache entry state.
      Parameters:
      cacheEntryState - the new cache entry state
    • getSCCacheEntryState

      public SC_CACHE_ENTRY_STATE getSCCacheEntryState()
      Gets the SC cache entry state.
      Returns:
      the SC cache entry state
    • setCachingMethod

      public void setCachingMethod(SC_CACHING_METHOD cachingMethod)
      Sets the caching method.
      Parameters:
      cachingMethod - the new caching method
    • isManaged

      public boolean isManaged()
      Checks if is managed.
      Returns:
      true, if is managed
    • isLoading

      public boolean isLoading()
      Checks if is loading.
      Returns:
      true, if is loading
    • isLoadingAppendix

      public boolean isLoadingAppendix()
      Checks if is loading appendix.
      Returns:
      true, if is loading appendix
    • isLoaded

      public boolean isLoaded()
      Checks if is this composite is loaded and is accessible. SC_CACHE_ENTRY_STATE
      Returns:
      true, if is loaded
    • getCreationTime

      public Date getCreationTime()
      Gets the creation time.
      Returns:
      the creation time
    • getLastModifiedTime

      public Date getLastModifiedTime()
      Gets the last modified time.
      Returns:
      the last modified time
    • setLastModified

      public void setLastModified()
      Sets the last modified.
    • getLoadingTimeoutMillis

      public int getLoadingTimeoutMillis()
      Gets the loading timeout milliseconds.
      Returns:
      the loading timeout milliseconds
    • setLoadingTimeoutMillis

      public void setLoadingTimeoutMillis(int loadingTimeoutMillis)
      Sets the loading timeout milliseconds.
      Parameters:
      loadingTimeoutMillis - the new loading timeout milliseconds
    • setHeader

      public void setHeader(Map<String,String> header)
      Clear the actual header and puts all header attributes from parameter instance.
      Parameters:
      header - the header
    • getHeader

      public Map<String,String> getHeader()
      Gets the header.
      Returns:
      the header
    • getNrOfAppendix

      public int getNrOfAppendix()
      Gets the number of appendix.
      Returns:
      the number of appendix
    • incrementNrOfAppendix

      public int incrementNrOfAppendix()
      Increment number of appendix.
      Returns:
      incremented number of appendix
    • getCacheGuardianName

      public String getCacheGuardianName()
      Gets the cache guardian name.
      Returns:
      the cache guardian name
    • setCacheGuardianName

      public void setCacheGuardianName(String cacheGuardianName)
      Sets the cache guardian name.
      Parameters:
      cacheGuardianName - the new cache guardian name
    • setExpDateTimeStr

      public void setExpDateTimeStr(String cacheExpirationDateTime)
      Sets the expiration date time string.
      Parameters:
      cacheExpirationDateTime - the new expiration date time string
    • getExpDateTimeStr

      public String getExpDateTimeStr()
      Gets the expiration date time string.
      Returns:
      the expiration date time string
    • getNrOfParts

      public int getNrOfParts(String cacheId)
      Gets the number of parts.
      Parameters:
      cacheId - the cache id
      Returns:
      the number of parts
    • getExpectedAppendix

      public int getExpectedAppendix()
      Gets the expected number of appendix.
      Returns:
      the expected number of appendix
    • setExpectedAppendix

      public void setExpectedAppendix(Integer expectedAppendix)
      Sets the expected number of appendix.
      Parameters:
      expectedAppendix - the new expected number of appendix
    • incrementNrOfPartsForDataMsg

      public int incrementNrOfPartsForDataMsg(String cacheId)
      Increment number of parts for cached data message.
      Parameters:
      cacheId - the cache id
      Returns:
      the number of parts
    • nrOfPartsByAppendixAsString

      public String nrOfPartsByAppendixAsString()
      Number of parts by appendix as string.
      Returns:
      the string