cameronlee314 commented on a change in pull request #1239: SAMZA-2421: Add
SystemProducer for Azure Blob Storage
URL: https://github.com/apache/samza/pull/1239#discussion_r362686415
##########
File path:
samza-azure/src/main/java/org/apache/samza/system/azureblob/compression/CompressionFactory.java
##########
@@ -25,6 +25,16 @@
* based on the {@link
org.apache.samza.system.azureblob.compression.CompressionType}.
*/
public class CompressionFactory {
+ private static CompressionFactory compressionFactoryInstance = null;
+ private CompressionFactory() {}
+
+ public static CompressionFactory getInstance() {
Review comment:
If you would like to do lazy initialization for the singleton, then you will
need to be careful about concurrent calls to `getInstance`.
This class doesn't need lazy initialization, so you could just initialize
directly when declaring the static variable. Then, you won't have to worry
about concurrent calls.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services