Class BinaryStorageInterceptor<T extends org.hl7.fhir.instance.model.api.IPrimitiveType<byte[]>>

java.lang.Object
ca.uhn.fhir.jpa.binary.interceptor.BinaryStorageInterceptor<T>

public class BinaryStorageInterceptor<T extends org.hl7.fhir.instance.model.api.IPrimitiveType<byte[]>> extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    UserData key that can be set in RequestDetails.getUserData() to override the isAllowAutoInflateBinaries() setting for a single request.
  • Constructor Summary

    Constructors
    Constructor
    Description
    BinaryStorageInterceptor(ca.uhn.fhir.context.FhirContext theCtx)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    expungeResource(AtomicInteger theCounter, org.hl7.fhir.instance.model.api.IBaseResource theResource)
     
    void
    extractLargeBinariesBeforeCreate(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, org.hl7.fhir.instance.model.api.IBaseResource theResource, ca.uhn.fhir.interceptor.api.Pointcut thePointcut)
     
    void
    extractLargeBinariesBeforeUpdate(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, org.hl7.fhir.instance.model.api.IBaseResource thePreviousResource, org.hl7.fhir.instance.model.api.IBaseResource theResource, ca.uhn.fhir.interceptor.api.Pointcut thePointcut)
     
    long
    Any externalized binaries will be rehydrated if their size is below this thhreshold when reading the resource back.
     
    boolean
     
    void
    preShow(ca.uhn.fhir.rest.api.server.IPreResourceShowDetails theDetails, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
     
    void
    setAllowAutoInflateBinaries(boolean theAllowAutoInflateBinaries)
     
    void
    setAutoInflateBinariesMaximumSize(long theAutoInflateBinariesMaximumBytes)
    Any externalized binaries will be rehydrated if their size is below this thhreshold when reading the resource back.
    void
    storeLargeBinariesBeforeCreatePersistence(ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, org.hl7.fhir.instance.model.api.IBaseResource theResource, ca.uhn.fhir.interceptor.api.Pointcut thePointcut)
     

    Methods inherited from class java.lang.Object

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

    • AUTO_INFLATE_BINARY_CONTENT_KEY

      UserData key that can be set in RequestDetails.getUserData() to override the isAllowAutoInflateBinaries() setting for a single request.

      Possible values:

      • Boolean.TRUE ? force binary inflation even if globally disabled
      • Boolean.FALSE ? skip binary inflation even if globally enabled
      • Absent ? use the global isAllowAutoInflateBinaries() setting
  • Constructor Details

  • Method Details

    • getAutoInflateBinariesMaximumSize

      Any externalized binaries will be rehydrated if their size is below this thhreshold when reading the resource back. Default is 10MB.
    • setAutoInflateBinariesMaximumSize

      public void setAutoInflateBinariesMaximumSize(long theAutoInflateBinariesMaximumBytes)
      Any externalized binaries will be rehydrated if their size is below this thhreshold when reading the resource back. Default is 10MB.
    • expungeResource

      public void expungeResource(AtomicInteger theCounter, org.hl7.fhir.instance.model.api.IBaseResource theResource)
    • extractLargeBinariesBeforeCreate

      public void extractLargeBinariesBeforeCreate(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, org.hl7.fhir.instance.model.api.IBaseResource theResource, ca.uhn.fhir.interceptor.api.Pointcut thePointcut) throws IOException
      Throws:
      IOException
    • extractLargeBinariesBeforeUpdate

      public void extractLargeBinariesBeforeUpdate(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, org.hl7.fhir.instance.model.api.IBaseResource thePreviousResource, org.hl7.fhir.instance.model.api.IBaseResource theResource, ca.uhn.fhir.interceptor.api.Pointcut thePointcut) throws IOException
      Throws:
      IOException
    • storeLargeBinariesBeforeCreatePersistence

      public void storeLargeBinariesBeforeCreatePersistence(ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, org.hl7.fhir.instance.model.api.IBaseResource theResource, ca.uhn.fhir.interceptor.api.Pointcut thePointcut) throws IOException
      Throws:
      IOException
    • getDeferredListKey

    • preShow

      public void preShow(ca.uhn.fhir.rest.api.server.IPreResourceShowDetails theDetails, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) throws IOException
      Throws:
      IOException
    • setAllowAutoInflateBinaries

      public void setAllowAutoInflateBinaries(boolean theAllowAutoInflateBinaries)
    • isAllowAutoInflateBinaries

      public boolean isAllowAutoInflateBinaries()