Permalink
Browse files

Cleanup: more WhiteList->Autorouting renames

Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
  • Loading branch information...
1 parent d3832ef commit 3fca1452929426197c9154cf2cd8b01c9043e920 @ifedorenko ifedorenko committed Apr 2, 2013
Showing with 278 additions and 271 deletions.
  1. +3 −3 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/AbstractMavenRepository.java
  2. +1 −1 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/routing/DiscoveryConfig.java
  3. +39 −36 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/routing/Manager.java
  4. +1 −1 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/routing/PrefixSource.java
  5. +4 −4 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/routing/ProxyRequestFilter.java
  6. +6 −6 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/routing/PublishingStatus.java
  7. +1 −1 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/routing/discovery/DiscoveryResult.java
  8. +3 −3 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/routing/discovery/RemoteStrategy.java
  9. +5 −5 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/routing/internal/ConfigImpl.java
  10. +17 −17 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/routing/internal/EventDispatcher.java
  11. +1 −1 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/routing/internal/FilePrefixSource.java
  12. +12 −11 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/routing/internal/ManagerImpl.java
  13. +1 −1 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/routing/internal/PathMatcher.java
  14. +3 −3 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/routing/internal/ProxyRequestFilterImpl.java
  15. +1 −1 ...-core/src/main/java/org/sonatype/nexus/proxy/maven/routing/internal/RemotePrefixFileStrategy.java
  16. +1 −1 ...src/main/java/org/sonatype/nexus/proxy/maven/routing/internal/TextFilePrefixSourceMarshaller.java
  17. +8 −6 ...e/src/main/java/org/sonatype/nexus/proxy/maven/routing/internal/WritablePrefixSourceModifier.java
  18. +3 −3 ...n/java/org/sonatype/nexus/proxy/maven/routing/internal/task/executor/ConstrainedExecutorImpl.java
  19. +122 −122 nexus-core/src/test/java/org/sonatype/nexus/proxy/maven/routing/internal/PathMatcherTest.java
  20. +16 −15 ...core/src/test/java/org/sonatype/nexus/proxy/maven/routing/internal/PrefixFileMaintenanceTest.java
  21. +15 −15 .../org/sonatype/nexus/proxy/maven/routing/internal/PrefixFileUpdatePropagationGroupUpdatesTest.java
  22. +4 −4 ...per-plugin/src/main/java/org/sonatype/nexus/plugins/routing/api/RoutingWaitForPlexusResource.java
  23. +4 −4 ...t/nexus-test-harness-launcher/src/main/java/org/sonatype/nexus/test/booter/Jetty8NexusBooter.java
  24. +3 −3 ...x/nexus-restlet1x-plugin/src/main/java/org/sonatype/nexus/rest/routing/RoutingConfigResource.java
  25. +1 −1 .../nexus-restlet1x-plugin/src/main/java/org/sonatype/nexus/rest/routing/RoutingResourceSupport.java
  26. +3 −3 ...x/nexus-restlet1x-plugin/src/main/java/org/sonatype/nexus/rest/routing/RoutingStatusResource.java
@@ -459,7 +459,7 @@ protected boolean shouldTryRemote( final ResourceStoreRequest request )
{
return false;
}
- // apply WLFilter to "normal" requests only, not hidden (which is meta or plain hidden)
+ // apply autorouting filter to "normal" requests only, not hidden (which is meta or plain hidden)
final RepositoryItemUid uid = createUid( request.getRequestPath() );
if ( !uid.getBooleanAttributeValue( IsHiddenAttribute.class ) )
{
@@ -590,7 +590,7 @@ private void putChecksumItem( Map<String, StorageItem> checksums, ResourceStoreR
}
/**
- * Beside original behavior, only add to NFC when it's not WL that rejected remote access.
+ * Beside original behavior, only add to NFC when remote access is not rejected by autorouting.
*
* @since 2.4
*/
@@ -602,7 +602,7 @@ protected boolean shouldAddToNotFoundCache( final ResourceStoreRequest request )
{
// TODO: should we un-flag the request?
shouldAddToNFC = false;
- getLogger().debug( "Maven proxy repository {} WL rejected this request, not adding path {} to NFC.",
+ getLogger().debug( "Maven proxy repository {} autorouting rejected this request, not adding path {} to NFC.",
RepositoryStringUtils.getHumanizedNameString( this ), request.getRequestPath() );
}
return shouldAddToNFC;
@@ -15,7 +15,7 @@
import static com.google.common.base.Preconditions.checkArgument;
/**
- * Configuration properties of the WL.
+ * Configuration properties of the autorouting.
*
* @author cstamas
* @since 2.4
@@ -22,7 +22,7 @@
import org.sonatype.nexus.proxy.storage.remote.RemoteRepositoryStorage;
/**
- * WL Manager component.
+ * Autorouting Manager component.
*
* @author cstamas
* @since 2.4
@@ -31,8 +31,8 @@
{
/**
* Key that is put into {@link ResourceStoreRequest}'s context for prefix file related operations, to mark that the
- * file operation is initiated by WL feature. Only the presence (or no presence) of this key is used for flagging,
- * the value mapped under this key is irrelevant.
+ * file operation is initiated by autorouting feature. Only the presence (or no presence) of this key is used for
+ * flagging, the value mapped under this key is irrelevant.
*/
String ROUTING_INITIATED_FILE_OPERATION_FLAG_KEY = Manager.class.getName() + ".fileOperation";
@@ -45,10 +45,10 @@
/**
* Key that when put into {@link ResourceStoreRequest}'s context, the given request becomes a
- * "not a filtering subject". WL's {@link ProxyRequestFilter} will not interfere with that request, it will be not
- * subject for filtering. It should be used sparingly, only in cases when you know that WL might interfere with your
- * request, usually because of stale WL. Only the presence (or no presence) of this key is used for flagging, the
- * value mapped under this key is irrelevant.
+ * "not a filtering subject". Autorouting's {@link ProxyRequestFilter} will not interfere with that request, it will
+ * be not subject for filtering. It should be used sparingly, only in cases when you know that autorouting might
+ * interfere with your request, usually because of stale prefix list. Only the presence (or no presence) of this key
+ * is used for flagging, the value mapped under this key is irrelevant.
*/
String ROUTING_REQUEST_NFS_FLAG_KEY = Manager.class.getName() + ".requestNfs";
@@ -63,17 +63,18 @@
void shutdown();
/**
- * Initializes WL of given repository (used on repository addition and on boot when called with all defined
+ * Initializes prefix list of given repository (used on repository addition and on boot when called with all defined
* repository during boot up).
*
* @param mavenRepository
*/
void initializePrefixFile( MavenRepository mavenRepository );
/**
- * Executes an update of WL for given repository. In case of {@link MavenProxyRepository} instance, it might not do
- * anything, depending is configuration returned by {@link #getRemoteDiscoveryConfig(MavenProxyRepository)} for it
- * enabled or not. This method invocation will spawn the update in background, and return immediately.
+ * Executes an update of prefix list for given repository. In case of {@link MavenProxyRepository} instance, it
+ * might not do anything, depending is configuration returned by
+ * {@link #getRemoteDiscoveryConfig(MavenProxyRepository)} for it enabled or not. This method invocation will spawn
+ * the update in background, and return immediately.
*
* @param mavenRepository
* @return {@code true} if the update job was actually spawned, or {@code false} if not since one is already running
@@ -86,10 +87,11 @@ boolean updatePrefixFile( MavenRepository mavenRepository )
throws IllegalStateException;
/**
- * Executes an update of WL for given repository. In case of {@link MavenProxyRepository} instance, it might not do
- * anything, depending is configuration returned by {@link #getRemoteDiscoveryConfig(MavenProxyRepository)} for it
- * enabled or not. This method invocation will always spawn the update in background, and return immediately. Also,
- * this method will cancel any currently running updates on same repository.
+ * Executes an update of prefix list for given repository. In case of {@link MavenProxyRepository} instance, it
+ * might not do anything, depending is configuration returned by
+ * {@link #getRemoteDiscoveryConfig(MavenProxyRepository)} for it enabled or not. This method invocation will always
+ * spawn the update in background, and return immediately. Also, this method will cancel any currently running
+ * updates on same repository.
*
* @param mavenRepository
* @return {@code true} if another already running update was cancelled to execute this forced update.
@@ -100,11 +102,12 @@ boolean forceUpdatePrefixFile( MavenRepository mavenRepository )
throws IllegalStateException;
/**
- * Special version of update of WL for given Maven2 proxy repository. This method will execute <b>synchronously</b>
- * and doing "quick" update only (will never scrape, only will try prefix file fetch from remote). Usable in special
- * cases when you know remote should have prefix file published, and you are interested in results immediately (or
- * at least ASAP). Still, consider that this method does remote access (using {@link RemoteRepositoryStorage} of the
- * given repository), hence, might have longer runtime (network latency, remote server load and such).
+ * Special version of update of prefix list for given Maven2 proxy repository. This method will execute
+ * <b>synchronously</b> and doing "quick" update only (will never scrape, only will try prefix file fetch from
+ * remote). Usable in special cases when you know remote should have prefix file published, and you are interested
+ * in results immediately (or at least ASAP). Still, consider that this method does remote access (using
+ * {@link RemoteRepositoryStorage} of the given repository), hence, might have longer runtime (network latency,
+ * remote server load and such).
*
* @param mavenProxyRepository
* @throws IllegalStateException when the passed in repository is unsupported, or for some reason not in state to be
@@ -114,16 +117,16 @@ void forceProxyQuickUpdatePrefixFile( MavenProxyRepository mavenProxyRepository
throws IllegalStateException;
/**
- * Queries is the given {@link MavenRepository} supported by WL feature (as not all Maven2 nor all
+ * Queries is the given {@link MavenRepository} supported by autorouting feature (as not all Maven2 nor all
* {@link MavenRepository} implementations are supported! We exclude Maven1 layout and Maven2 shadow repositories).
*
* @param mavenRepository
- * @return {@code true} if WL feature is supported for given repository instance.
+ * @return {@code true} if autorouting feature is supported for given repository instance.
*/
boolean isMavenRepositorySupported( final MavenRepository mavenRepository );
/**
- * Returns the WL status for given repository.
+ * Returns the autorouting status for given repository.
*
* @param mavenRepository
* @return the status, never {@code null}.
@@ -151,33 +154,33 @@ void setRemoteDiscoveryConfig( MavenProxyRepository mavenProxyRepository, Discov
throws IOException;
/**
- * Maintains the WL of a hosted repository. Offers entries to WL, and method updates the WL of given hosted
- * repository if needed. If WL modified, returns {@code true}.
+ * Maintains the prefix list of a hosted repository. Offers entries to prefix list, and method updates the prefix
+ * list of given hosted repository if needed. If prefix list modified, returns {@code true}.
*
- * @param mavenHostedRepository the hosted repository to which WL we offer entries.
+ * @param mavenHostedRepository the hosted repository to which prefix list we offer entries.
* @param entry the entry offered.
- * @return {@code true} if WL was changed, {@code false} otherwise.
+ * @return {@code true} if prefix list was changed, {@code false} otherwise.
* @throws IOException in case of some IO problem.
*/
boolean offerEntry( final MavenHostedRepository mavenHostedRepository, String entry )
throws IOException;
/**
- * Maintains the WL of a hosted repository. Revokes entries from WL, and method updates the WL of given hosted
- * repository if needed. If WL modified, returns {@code true}.
+ * Maintains the prefix list of a hosted repository. Revokes entries from prefix list, and method updates the prefix
+ * list of given hosted repository if needed. If prefix list modified, returns {@code true}.
*
- * @param mavenHostedRepository the hosted repository from which WL we revoke entries.
+ * @param mavenHostedRepository the hosted repository from which prefix list we revoke entries.
* @param entry the entry revoked.
- * @return {@code true} if WL was changed, {@code false} otherwise.
+ * @return {@code true} if prefix list was changed, {@code false} otherwise.
* @throws IOException in case of some IO problem.
*/
boolean revokeEntry( final MavenHostedRepository mavenHostedRepository, String entry )
throws IOException;
/**
- * Returns {@link PrefixSource} for given {@link MavenRepository}.For the existence of the WL in question (if you
- * want to read it), check {@link PrefixSource#exists()} and {@link PrefixSource#supported()} method! Never returns
- * {@code null}.
+ * Returns {@link PrefixSource} for given {@link MavenRepository}.For the existence of the prefix list in question
+ * (if you want to read it), check {@link PrefixSource#exists()} and {@link PrefixSource#supported()} method! Never
+ * returns {@code null}.
*
* @param mavenRepository
* @return the {@link PrefixSource} for given repository.
@@ -206,11 +209,11 @@ void unpublish( MavenRepository mavenRepository )
// ==
/**
- * Checks whether the passed in item event is about WL file. In other words, is event originating from a
+ * Checks whether the passed in item event is about prefix list file. In other words, is event originating from a
* {@link MavenRepository} and has specific path.
*
* @param evt
- * @return {@code true} if item event is about WL file.
+ * @return {@code true} if item event is about prefix list file.
*/
boolean isEventAboutPrefixFile( final RepositoryItemEvent evt );
}
@@ -16,7 +16,7 @@
import java.util.List;
/**
- * Prefix source main purpose is to serve/read-up WL prefix entries. It might be backed (or sourced) from multiple
+ * Prefix source main purpose is to serve/read-up prefix list entries. It might be backed (or sourced) from multiple
* things, like file or even a plain array of strings.
*
* @author cstamas
@@ -27,10 +27,10 @@
{
/**
* Evaluates the passed in combination of {@link MavenProxyRepository} and {@link ResourceStoreRequest} and decides
- * does the WL (if any) of given repository allows the request to be passed to remote storage of proxy repository.
- * If allows, will return {@code true}, if not, it returns {@code false}. Still, possibility is left to this method
- * to throw some exceptions too to signal some extraordinary information, or, to provide extra information why some
- * request should result in "not found" response.
+ * does the prefix list (if any) of given repository allows the request to be passed to remote storage of proxy
+ * repository. If allows, will return {@code true}, if not, it returns {@code false}. Still, possibility is left to
+ * this method to throw some exceptions too to signal some extraordinary information, or, to provide extra
+ * information why some request should result in "not found" response.
*
* @param mavenProxyRepository
* @param resourceStoreRequest
@@ -28,12 +28,12 @@
public static enum PStatus
{
/**
- * WL is published okay for given repository.
+ * Prefix list is published okay for given repository.
*/
PUBLISHED,
/**
- * WL is not published for given repository.
+ * Prefix list is not published for given repository.
*/
NOT_PUBLISHED;
}
@@ -84,9 +84,9 @@ public String getLastPublishedMessage()
}
/**
- * Time stamp (milliseconds) of the last published WL, or -1 if not published.
+ * Time stamp (milliseconds) of the last published prefix list, or -1 if not published.
*
- * @return time stamp (milliseconds) of the last published WL, or -1 if not published.
+ * @return time stamp (milliseconds) of the last published prefix list, or -1 if not published.
*/
public long getLastPublishedTimestamp()
{
@@ -101,9 +101,9 @@ public long getLastPublishedTimestamp()
}
/**
- * Repository path of the published WL file, or, {@code null} if not published.
+ * Repository path of the published prefix list file, or, {@code null} if not published.
*
- * @return repository path of the published WL file, or, {@code null} if not published.
+ * @return repository path of the published prefix list file, or, {@code null} if not published.
*/
public String getLastPublishedFilePath()
{
@@ -222,7 +222,7 @@ public void recordSuccess( final String usedStrategyId, final String message, fi
/**
* Records a failure on behalf of a strategy, if this has not yet recorded a success, in which case this method will
- * do nothing. A failure simply means "this strategy failed to get remote WL".
+ * do nothing. A failure simply means "this strategy failed to get remote prefix list".
*
* @param usedStrategyId
* @param message
@@ -18,9 +18,9 @@
import org.sonatype.nexus.proxy.maven.MavenRepository;
/**
- * Strategy for remote content discovery for WL by some means. It is identified by {@link #getId()} and has priority
- * {@link #getPriority()}. Latter is used to sort (using natural order of integers) the instances and try the one by one
- * in sorted order.
+ * Strategy for remote content discovery for prefix list by some means. It is identified by {@link #getId()} and has
+ * priority {@link #getPriority()}. Latter is used to sort (using natural order of integers) the instances and try the
+ * one by one in sorted order.
*
* @author cstamas
* @since 2.4
@@ -33,8 +33,8 @@
implements Config
{
/**
- * System property key that is used to read up boolean value controlling is WL feature active or not. Main use case
- * is to disable this in "legacy" UTs and ITs, but might serve too as troubleshooting in some cases. Event
+ * System property key that is used to read up boolean value controlling if autorouting feature active or not. Main
+ * use case is to disable this in "legacy" UTs and ITs, but might serve too as troubleshooting in some cases. Event
* dispatcher is active by default, to deactivate it, specify a system property like this:
*
* <pre>
@@ -43,9 +43,9 @@
*
* Note: This does NOT REMOVE the Feature itself! The feature will be still present and working but remote content
* discovery will be completely disabled, hence, all the proxies and groups having proxies as members will simply be
- * marked for noscrape. Also, since no WL will be published, no "proxy optimization" will happen either. If neglect
- * the noscape, Nexus will work as it was working before 2.4 release. Using system property with this key should be
- * restricted to tests or some troubleshooting only.
+ * marked for noscrape. Also, since no prefix list will be published, no "proxy optimization" will happen either. If
+ * neglect the noscape, Nexus will work as it was working before 2.4 release. Using system property with this key
+ * should be restricted to tests or some troubleshooting only.
*/
public static final String FEATURE_ACTIVE_KEY = Config.class.getName() + ".featureActive";
Oops, something went wrong.

0 comments on commit 3fca145

Please sign in to comment.