From 3e1dac951d220a6b7bf6287a59d8b0782944bf3d Mon Sep 17 00:00:00 2001 From: Aaron Echavarria Date: Sun, 15 Sep 2024 22:52:37 -0600 Subject: [PATCH] create javadoc --- .../jte/util/FileSystemWrapperFactory.groovy | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/main/groovy/org/boozallen/plugins/jte/util/FileSystemWrapperFactory.groovy b/src/main/groovy/org/boozallen/plugins/jte/util/FileSystemWrapperFactory.groovy index d347c804..8a3abcab 100644 --- a/src/main/groovy/org/boozallen/plugins/jte/util/FileSystemWrapperFactory.groovy +++ b/src/main/groovy/org/boozallen/plugins/jte/util/FileSystemWrapperFactory.groovy @@ -36,6 +36,24 @@ import org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject */ class FileSystemWrapperFactory { + /** + * A static cache that maps {@link FileSystemCacheKey} instances to their corresponding + * {@link FileSystemWrapper} objects. + * + *

This cache is used to avoid redundant filesystem operations by reusing {@code FileSystemWrapper} + * instances that have already been created for a given {@link FileSystemCacheKey}. It helps + * improve performance by preventing repeated lookups or calculations for the same SCM data + * during Jenkins pipeline executions.

+ * + *

The cache is implemented as a {@code Map}, where:

+ * + * + *

This cache is a static attribute of the class, shared across all instances of {@code FileSystemCacheKey}, + * and is initialized as an empty map, represented by {@code [:]}. It can grow dynamically as new entries are added during runtime.

+ */ private static Map cache = [:] /**