Class AbstractSystemConfigurationImpl
- java.lang.Object
-
- com.ibm.fhir.operation.bulkdata.config.impl.AbstractSystemConfigurationImpl
-
- All Implemented Interfaces:
ConfigurationAdapter
- Direct Known Subclasses:
V2ConfigurationImpl
public abstract class AbstractSystemConfigurationImpl extends java.lang.Object implements ConfigurationAdapter
Common between the Legacy and V2 Configuration and Implementation Also the system defaults.
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
DEFAULT_AZURE_OBJ_MAX_RESOURCE_COUNT
protected static int
DEFAULT_AZURE_OBJ_MAX_SIZE_MB
protected static int
DEFAULT_COS_OBJ_MAX_RESOURCE_COUNT
protected static int
DEFAULT_COS_OBJ_MAX_SIZE_MB
protected static int
DEFAULT_FILE_MAX_RESOURCE_COUNT
protected static int
DEFAULT_FILE_MAX_SIZE_MB
protected static int
DEFAULT_PAGE_SIZE
static int
IMPORT_INFLY_RATE_NUMOFFHIRRESOURCES
static int
IMPORT_NUMOFFHIRRESOURCES_PERREAD
-
Constructor Summary
Constructors Constructor Description AbstractSystemConfigurationImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
enabled()
boolean
enableSkippableUpdates()
java.lang.String
getApplicationName()
get the application name used in the javabatch framework.java.lang.String
getBaseFileLocation(java.lang.String provider)
get the base file locationint
getCoreAzureObjectResourceCountThreshold()
The number of resources at which to finish writing to a given AzureBlob object,long
getCoreAzureObjectSizeThreshold()
The size (in bytes) at which to finish writing to a given AzureBlob object,java.lang.String
getCoreBatchIdEncryptionKey()
get core batch id encryption key for the job id that is returnedint
getCoreCosObjectResourceCountThreshold()
The number of resources at which to finish writing to a given COS object, or 0 to indicate that there is no resource count threshold.long
getCoreCosObjectSizeThreshold()
The size (in bytes) at which to finish writing to a given COS object, or 0 to indicate that there is no object size threshold.int
getCoreCosPartUploadTriggerSize()
The size (in bytes) at which to begin writing a part for a COS multi-part upload.int
getCoreCosRequestTimeout()
int
getCoreCosSocketTimeout()
boolean
getCoreCosTcpKeepAlive()
get the COS TCP Keep alive setting (true or false)long
getCoreFastMaxReadTimeout()
get the number ms to read payloads from the persistence layer before stopping to checkpointint
getCoreFileResourceCountThreshold()
The number of resources at which to finish writing to a given file, or 0 to indicate that there is no resource count threshold.long
getCoreFileSizeThreshold()
The size (in bytes) at which to finish writing to a given file, or 0 to indicate that there is no file size threshold.int
getCoreFileWriteTriggerSize()
The size (in bytes) to buffer before writing to file.java.lang.String
getCoreIamEndpoint()
get the core iam endpoint (it is set one time for the whole system)int
getCoreMaxPartitions()
get core max partitionsint
getCorePageSize()
get the core page size used in Search.java.lang.String
getDefaultExportProvider()
get default export providerjava.lang.String
getDefaultImportProvider()
get default import providerbyte[]
getEndOfFileDelimiter(java.lang.String provider)
int
getImportInflyRateNumberOfFhirResources(java.lang.String provider)
the infly rate for the importint
getImportNumberOfFhirResourcesPerRead(java.lang.String provider)
get the import fhir resources per readint
getInputLimit()
limit of inputsjava.lang.String
getJobXMLName()
get the job xml used in the javabatch framework.java.lang.String
getModuleName()
get the module name used in javabatch framework.java.lang.String
getOperationOutcomeProvider(java.lang.String provider)
get the OperationOutcome providerint
getPresignedUrlExpiry()
the expiry time of the generated presigned urls.S3HostStyle
getS3HostStyleByStorageProvider(java.lang.String provider)
gets the storage typejava.lang.String
getStorageProviderAuthTypeConnectionString(java.lang.String provider)
get the connection string for the azure type account with a connection string.StorageType
getStorageProviderStorageType(java.lang.String provider)
java.lang.String
getTenant()
gets a tenant in the current contextboolean
hasStorageProvider(java.lang.String storageProvider)
boolean
isStorageProviderAuthTypeConnectionString(java.lang.String provider)
checks the provider to see if this is an azure connection string.boolean
isStorageProviderHmacPresigned(java.lang.String provider)
boolean
isStorageTypeAllowed(java.lang.String storageType)
checks if thevoid
registerRequestContext(java.lang.String tenantId, java.lang.String datastoreId, java.lang.String incomingUrl)
creates a uniform request context for the $import and $export operations.boolean
shouldCoreApiBatchTrustAll()
boolean
shouldCoreCosUseServerTruststore()
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.fhir.operation.bulkdata.config.ConfigurationAdapter
getCoreApiBatchPassword, getCoreApiBatchTrustStore, getCoreApiBatchTrustStorePassword, getCoreApiBatchUrl, getCoreApiBatchUser, getStorageProviderAuthType, getStorageProviderAuthTypeHmacAccessKey, getStorageProviderAuthTypeHmacSecretKey, getStorageProviderAuthTypeIamApiKey, getStorageProviderAuthTypeIamApiResourceInstanceId, getStorageProviderAuthTypePassword, getStorageProviderAuthTypeUsername, getStorageProviderBucketName, getStorageProviderEndpointExternal, getStorageProviderEndpointInternal, getStorageProviderLocation, getStorageProviderType, getStorageProviderUsesRequestAccessToken, getStorageProviderValidBaseUrls, isFastExport, isStorageProviderAuthTypeBasic, isStorageProviderAuthTypeHmac, isStorageProviderAuthTypeIam, legacy, shouldStorageProviderAllowAllResources, shouldStorageProviderCheckDuplicate, shouldStorageProviderCollectOperationOutcomes, shouldStorageProviderCreate, shouldStorageProviderValidateBaseUrl, shouldStorageProviderValidateResources
-
-
-
-
Field Detail
-
DEFAULT_COS_OBJ_MAX_SIZE_MB
protected static final int DEFAULT_COS_OBJ_MAX_SIZE_MB
- See Also:
- Constant Field Values
-
DEFAULT_COS_OBJ_MAX_RESOURCE_COUNT
protected static final int DEFAULT_COS_OBJ_MAX_RESOURCE_COUNT
- See Also:
- Constant Field Values
-
DEFAULT_AZURE_OBJ_MAX_SIZE_MB
protected static final int DEFAULT_AZURE_OBJ_MAX_SIZE_MB
- See Also:
- Constant Field Values
-
DEFAULT_AZURE_OBJ_MAX_RESOURCE_COUNT
protected static final int DEFAULT_AZURE_OBJ_MAX_RESOURCE_COUNT
- See Also:
- Constant Field Values
-
DEFAULT_FILE_MAX_SIZE_MB
protected static final int DEFAULT_FILE_MAX_SIZE_MB
- See Also:
- Constant Field Values
-
DEFAULT_FILE_MAX_RESOURCE_COUNT
protected static final int DEFAULT_FILE_MAX_RESOURCE_COUNT
- See Also:
- Constant Field Values
-
DEFAULT_PAGE_SIZE
protected static final int DEFAULT_PAGE_SIZE
- See Also:
- Constant Field Values
-
IMPORT_NUMOFFHIRRESOURCES_PERREAD
public static final int IMPORT_NUMOFFHIRRESOURCES_PERREAD
- See Also:
- Constant Field Values
-
IMPORT_INFLY_RATE_NUMOFFHIRRESOURCES
public static final int IMPORT_INFLY_RATE_NUMOFFHIRRESOURCES
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCoreCosTcpKeepAlive
public boolean getCoreCosTcpKeepAlive()
Description copied from interface:ConfigurationAdapter
get the COS TCP Keep alive setting (true or false)- Specified by:
getCoreCosTcpKeepAlive
in interfaceConfigurationAdapter
- Returns:
-
getCoreMaxPartitions
public int getCoreMaxPartitions()
Description copied from interface:ConfigurationAdapter
get core max partitions- Specified by:
getCoreMaxPartitions
in interfaceConfigurationAdapter
- Returns:
-
getCoreBatchIdEncryptionKey
public java.lang.String getCoreBatchIdEncryptionKey()
Description copied from interface:ConfigurationAdapter
get core batch id encryption key for the job id that is returned- Specified by:
getCoreBatchIdEncryptionKey
in interfaceConfigurationAdapter
- Returns:
-
getCoreCosSocketTimeout
public int getCoreCosSocketTimeout()
- Specified by:
getCoreCosSocketTimeout
in interfaceConfigurationAdapter
- Returns:
- the timeout for the s3 socket
-
getInputLimit
public int getInputLimit()
Description copied from interface:ConfigurationAdapter
limit of inputs- Specified by:
getInputLimit
in interfaceConfigurationAdapter
- Returns:
-
getCoreCosRequestTimeout
public int getCoreCosRequestTimeout()
- Specified by:
getCoreCosRequestTimeout
in interfaceConfigurationAdapter
- Returns:
- the timeout for the s3 request
-
shouldCoreCosUseServerTruststore
public boolean shouldCoreCosUseServerTruststore()
- Specified by:
shouldCoreCosUseServerTruststore
in interfaceConfigurationAdapter
- Returns:
- the system wide setting for using the server truststore.
-
getCoreCosPartUploadTriggerSize
public int getCoreCosPartUploadTriggerSize()
Description copied from interface:ConfigurationAdapter
The size (in bytes) at which to begin writing a part for a COS multi-part upload.- Specified by:
getCoreCosPartUploadTriggerSize
in interfaceConfigurationAdapter
- Returns:
-
getCoreCosObjectSizeThreshold
public long getCoreCosObjectSizeThreshold()
Description copied from interface:ConfigurationAdapter
The size (in bytes) at which to finish writing to a given COS object, or 0 to indicate that there is no object size threshold.- Specified by:
getCoreCosObjectSizeThreshold
in interfaceConfigurationAdapter
- Returns:
-
getCoreCosObjectResourceCountThreshold
public int getCoreCosObjectResourceCountThreshold()
Description copied from interface:ConfigurationAdapter
The number of resources at which to finish writing to a given COS object, or 0 to indicate that there is no resource count threshold.- Specified by:
getCoreCosObjectResourceCountThreshold
in interfaceConfigurationAdapter
- Returns:
-
getCoreAzureObjectSizeThreshold
public long getCoreAzureObjectSizeThreshold()
Description copied from interface:ConfigurationAdapter
The size (in bytes) at which to finish writing to a given AzureBlob object,- Specified by:
getCoreAzureObjectSizeThreshold
in interfaceConfigurationAdapter
- Returns:
-
getCoreAzureObjectResourceCountThreshold
public int getCoreAzureObjectResourceCountThreshold()
Description copied from interface:ConfigurationAdapter
The number of resources at which to finish writing to a given AzureBlob object,- Specified by:
getCoreAzureObjectResourceCountThreshold
in interfaceConfigurationAdapter
- Returns:
-
getCoreFileWriteTriggerSize
public int getCoreFileWriteTriggerSize()
Description copied from interface:ConfigurationAdapter
The size (in bytes) to buffer before writing to file.- Specified by:
getCoreFileWriteTriggerSize
in interfaceConfigurationAdapter
- Returns:
-
getCoreFileSizeThreshold
public long getCoreFileSizeThreshold()
Description copied from interface:ConfigurationAdapter
The size (in bytes) at which to finish writing to a given file, or 0 to indicate that there is no file size threshold.- Specified by:
getCoreFileSizeThreshold
in interfaceConfigurationAdapter
- Returns:
-
getCoreFileResourceCountThreshold
public int getCoreFileResourceCountThreshold()
Description copied from interface:ConfigurationAdapter
The number of resources at which to finish writing to a given file, or 0 to indicate that there is no resource count threshold.- Specified by:
getCoreFileResourceCountThreshold
in interfaceConfigurationAdapter
- Returns:
-
getApplicationName
public java.lang.String getApplicationName()
Description copied from interface:ConfigurationAdapter
get the application name used in the javabatch framework.- Specified by:
getApplicationName
in interfaceConfigurationAdapter
- Returns:
-
getModuleName
public java.lang.String getModuleName()
Description copied from interface:ConfigurationAdapter
get the module name used in javabatch framework.- Specified by:
getModuleName
in interfaceConfigurationAdapter
- Returns:
-
getJobXMLName
public java.lang.String getJobXMLName()
Description copied from interface:ConfigurationAdapter
get the job xml used in the javabatch framework.- Specified by:
getJobXMLName
in interfaceConfigurationAdapter
- Returns:
-
registerRequestContext
public void registerRequestContext(java.lang.String tenantId, java.lang.String datastoreId, java.lang.String incomingUrl) throws FHIRException
Description copied from interface:ConfigurationAdapter
creates a uniform request context for the $import and $export operations.- Specified by:
registerRequestContext
in interfaceConfigurationAdapter
- Throws:
FHIRException
-
enabled
public boolean enabled()
- Specified by:
enabled
in interfaceConfigurationAdapter
- Returns:
- the status of the bulkdata feature, enabled = true, disabled = false
-
getCorePageSize
public int getCorePageSize()
Description copied from interface:ConfigurationAdapter
get the core page size used in Search.- Specified by:
getCorePageSize
in interfaceConfigurationAdapter
- Returns:
-
getCoreIamEndpoint
public java.lang.String getCoreIamEndpoint()
Description copied from interface:ConfigurationAdapter
get the core iam endpoint (it is set one time for the whole system)- Specified by:
getCoreIamEndpoint
in interfaceConfigurationAdapter
- Returns:
-
getCoreFastMaxReadTimeout
public long getCoreFastMaxReadTimeout()
Description copied from interface:ConfigurationAdapter
get the number ms to read payloads from the persistence layer before stopping to checkpoint- Specified by:
getCoreFastMaxReadTimeout
in interfaceConfigurationAdapter
- Returns:
-
isStorageTypeAllowed
public boolean isStorageTypeAllowed(java.lang.String storageType)
Description copied from interface:ConfigurationAdapter
checks if the- Specified by:
isStorageTypeAllowed
in interfaceConfigurationAdapter
- Returns:
-
getStorageProviderStorageType
public StorageType getStorageProviderStorageType(java.lang.String provider)
- Specified by:
getStorageProviderStorageType
in interfaceConfigurationAdapter
- Parameters:
provider
- of the storage type- Returns:
-
getTenant
public java.lang.String getTenant()
Description copied from interface:ConfigurationAdapter
gets a tenant in the current context- Specified by:
getTenant
in interfaceConfigurationAdapter
- Returns:
-
getBaseFileLocation
public java.lang.String getBaseFileLocation(java.lang.String provider)
Description copied from interface:ConfigurationAdapter
get the base file location- Specified by:
getBaseFileLocation
in interfaceConfigurationAdapter
- Returns:
-
isStorageProviderHmacPresigned
public boolean isStorageProviderHmacPresigned(java.lang.String provider)
- Specified by:
isStorageProviderHmacPresigned
in interfaceConfigurationAdapter
- Returns:
-
shouldCoreApiBatchTrustAll
public boolean shouldCoreApiBatchTrustAll()
- Specified by:
shouldCoreApiBatchTrustAll
in interfaceConfigurationAdapter
- Returns:
- should we trust the calls to the backend
-
getEndOfFileDelimiter
public byte[] getEndOfFileDelimiter(java.lang.String provider)
- Specified by:
getEndOfFileDelimiter
in interfaceConfigurationAdapter
- Returns:
-
getImportNumberOfFhirResourcesPerRead
public int getImportNumberOfFhirResourcesPerRead(java.lang.String provider)
Description copied from interface:ConfigurationAdapter
get the import fhir resources per read- Specified by:
getImportNumberOfFhirResourcesPerRead
in interfaceConfigurationAdapter
- Returns:
-
getImportInflyRateNumberOfFhirResources
public int getImportInflyRateNumberOfFhirResources(java.lang.String provider)
Description copied from interface:ConfigurationAdapter
the infly rate for the import- Specified by:
getImportInflyRateNumberOfFhirResources
in interfaceConfigurationAdapter
- Returns:
-
getPresignedUrlExpiry
public int getPresignedUrlExpiry()
Description copied from interface:ConfigurationAdapter
the expiry time of the generated presigned urls.- Specified by:
getPresignedUrlExpiry
in interfaceConfigurationAdapter
- Returns:
-
getDefaultImportProvider
public java.lang.String getDefaultImportProvider()
Description copied from interface:ConfigurationAdapter
get default import provider- Specified by:
getDefaultImportProvider
in interfaceConfigurationAdapter
- Returns:
-
getDefaultExportProvider
public java.lang.String getDefaultExportProvider()
Description copied from interface:ConfigurationAdapter
get default export provider- Specified by:
getDefaultExportProvider
in interfaceConfigurationAdapter
- Returns:
-
getOperationOutcomeProvider
public java.lang.String getOperationOutcomeProvider(java.lang.String provider)
Description copied from interface:ConfigurationAdapter
get the OperationOutcome provider- Specified by:
getOperationOutcomeProvider
in interfaceConfigurationAdapter
- Parameters:
provider
- the storage provider- Returns:
-
hasStorageProvider
public boolean hasStorageProvider(java.lang.String storageProvider)
- Specified by:
hasStorageProvider
in interfaceConfigurationAdapter
- Returns:
- True, iff the provider exists in the configuration.
-
getS3HostStyleByStorageProvider
public S3HostStyle getS3HostStyleByStorageProvider(java.lang.String provider)
Description copied from interface:ConfigurationAdapter
gets the storage type- Specified by:
getS3HostStyleByStorageProvider
in interfaceConfigurationAdapter
- Returns:
-
enableSkippableUpdates
public boolean enableSkippableUpdates()
- Specified by:
enableSkippableUpdates
in interfaceConfigurationAdapter
- Returns:
- the status of skippable updates
-
getStorageProviderAuthTypeConnectionString
public java.lang.String getStorageProviderAuthTypeConnectionString(java.lang.String provider)
Description copied from interface:ConfigurationAdapter
get the connection string for the azure type account with a connection string.- Specified by:
getStorageProviderAuthTypeConnectionString
in interfaceConfigurationAdapter
- Returns:
-
isStorageProviderAuthTypeConnectionString
public boolean isStorageProviderAuthTypeConnectionString(java.lang.String provider)
Description copied from interface:ConfigurationAdapter
checks the provider to see if this is an azure connection string.- Specified by:
isStorageProviderAuthTypeConnectionString
in interfaceConfigurationAdapter
- Returns:
- true, if connectionString
-
-