Class BlobContainerManager

  • All Implemented Interfaces:
    EventCallback

    public class BlobContainerManager
    extends java.lang.Object
    implements EventCallback
    Singleton to abstract and manage Azure Blob containers. Each tenant/datasource gets its own container. TODO: investigate if BlobContainerClient should be long-lived and shared by multiple threads and how to configure its http client library and executor when running inside Liberty.
    • Method Detail

      • getInstance

        public static BlobContainerManager getInstance()
        Get the singleton instance of this class
        Returns:
      • getSessionForTenantDatasource

        public static BlobManagedContainer getSessionForTenantDatasource()
        Get the (shared, thread-safe) connection object representing the Azure Blob connection for the current tenant/datasource (see FHIRRequestContext).
        Returns:
      • isPayloadPersistenceConfigured

        public static boolean isPayloadPersistenceConfigured()
        Check if payload persistence is configured for the current tenant/datasource
        Returns:
      • getPropertyGroupAdapter

        public BlobPropertyGroupAdapter getPropertyGroupAdapter​(java.lang.String dsPropertyName)
        Get a CassandraPropertyGroupAdapter bound to the property group described by the given dsPropertyName path (in fhir-server-config.json).
        Parameters:
        dsPropertyName -
        Returns:
      • shutdown

        public static void shutdown()
        Shut down the service so that we don't try and accept any new work
      • serverReady

        public void serverReady()
        Description copied from interface: EventCallback
        Called after the server startup processing is done and all services are ready
        Specified by:
        serverReady in interface EventCallback
      • startShutdown

        public void startShutdown()
        Description copied from interface: EventCallback
        Called at the start of shutdown. Must not block. This method is called for all registered EventCallback objects before finalShutdown() is called. Implementations may initiate, but not wait for, shutdown of the services they manage.
        Specified by:
        startShutdown in interface EventCallback
      • finalShutdown

        public void finalShutdown()
        Description copied from interface: EventCallback
        Called after all startShutdown() calls have been processed. Implementations should terminate internal services immediately at this point. Waiting for termination should be kept to a minimum, unless critical for stability.
        Specified by:
        finalShutdown in interface EventCallback