Class EhcacheInteractiveContinuationStorage

java.lang.Object
org.openehealth.ipf.commons.ihe.hl7v2.storage.EhcacheInteractiveContinuationStorage
All Implemented Interfaces:
InteractiveContinuationStorage

public class EhcacheInteractiveContinuationStorage extends Object implements InteractiveContinuationStorage
An Ehcache-based implementation of InteractiveContinuationStorage.
Author:
Dmytro Rud
  • Constructor Details

    • EhcacheInteractiveContinuationStorage

      public EhcacheInteractiveContinuationStorage(javax.cache.Cache<String,org.openehealth.ipf.commons.ihe.hl7v2.storage.EhcacheInteractiveContinuationStorage.InteractiveContinuationChain> ehcache)
  • Method Details

    • put

      public void put(String continuationPointer, String chainId, Message fragment)
      Description copied from interface: InteractiveContinuationStorage
      Puts a fragment into this storage.
      Specified by:
      put in interface InteractiveContinuationStorage
      Parameters:
      continuationPointer - continuation pointer of the fragment — identifies the fragment in the context of the fragment chain. Null values must be allowed.
      chainId - unique ID of the fragment chain. Consisting of the query tag of the fragment (QPD-2) and MSH-3-1, MSH-3-2, MSH-3-3 of the request.
      fragment - fragment as a HAPI message instance.
    • get

      public Message get(String continuationPointer, String chainId)
      Description copied from interface: InteractiveContinuationStorage
      Retrieves a fragment from the storage or null when no fragment with the given parameters could be found.
      Specified by:
      get in interface InteractiveContinuationStorage
      Parameters:
      continuationPointer - continuation pointer of the fragment — identifies the fragment in the context of the fragment chain. Null values must be allowed.
      chainId - unique ID of the fragment chain. Consists of the query tag of the fragment (QPD-2) and MSH-3-1, MSH-3-2, MSH-3-3 of the request.
      Returns:
      fragment as a HAPI message instance or null when none found.
    • delete

      public boolean delete(String chainId)
      Description copied from interface: InteractiveContinuationStorage
      Deletes all fragments which belong to the given query tag.
      Specified by:
      delete in interface InteractiveContinuationStorage
      Parameters:
      chainId - unique ID of the fragment chain. Consists of the query tag of the fragment (QPD-2) and MSH-3-1, MSH-3-2, MSH-3-3 of the request.
      Returns:
      true, when some fragments have been actually deleted, i.e. when the given query tag is known.