-
Notifications
You must be signed in to change notification settings - Fork 41
Migration of the cf-java-client dependency #1907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
karrgov
wants to merge
9
commits into
master
Choose a base branch
from
cf_java_client_poc
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e957b22
CF Java Client PoC migration
karrgov 6874258
Removing more leftovers, changing logging and removing cf-java-client…
karrgov f273ed5
Adding reactor-netty back not completed
karrgov 2fd10a4
Adding more fixes for the migration
karrgov 860fb56
Fix test
karrgov 698462b
Bettering everything as a whole - simplifications and logic changes
karrgov f3bf20d
Adding unit tests for coverage and fixing Sonar
karrgov 463ee28
Adding more unit tests and fixing existing ones
karrgov 245f56c
Fixing sonar issues and additional unit tests for coverage
karrgov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...apps-controller-client/src/main/java/org/cloudfoundry/multiapps/controller/Constants.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| package org.cloudfoundry.multiapps.controller; | ||
|
|
||
| import java.time.Duration; | ||
| import java.util.concurrent.TimeUnit; | ||
|
|
||
| public class Constants { | ||
|
|
||
| public static final Duration DEFAULT_CONNECT_TIMEOUT = Duration.ofMinutes(1); | ||
| public static final Duration JOB_POLL_MIN_INTERVAL = Duration.ofSeconds(1); | ||
| public static final Duration JOB_POLL_MAX_INTERVAL = Duration.ofSeconds(15); | ||
| public static final Duration DELETE_JOB_TIMEOUT = Duration.ofMinutes(5); | ||
| public static final Duration BINDING_OPERATIONS_TIMEOUT = Duration.ofMinutes(10); | ||
| public static final long PACKAGE_UPLOAD_JOB_POLLING_PERIOD = TimeUnit.SECONDS.toMillis(5); | ||
|
|
||
| public static final int DEFAULT_CONNECTION_POOL_SIZE = 192; | ||
| public static final int UNDEFINED_PORT = -1; | ||
| public static final int MAX_CONCURRENT_PAGES = 256; | ||
| public static final int DEFAULT_CONCURRENT_TASKS = 256; | ||
| public static final int MAX_CHAR_LENGTH_FOR_PARAMS_IN_REQUEST = 4000; | ||
|
|
||
| public static final String CONNECTION_POOL_NAME = "cf-controller-client"; | ||
| public static final String LOOP_RESOURCES_SUFFIX = "-loop-resources"; | ||
| public static final String CF_API_V3 = "/v3"; | ||
| public static final String HREF = "href"; | ||
| public static final String CLOUD_CONTROLLER_CF_ROOT_DOCUMENT_NAME = "cloud_controller_v3"; | ||
| public static final String LOG_CACHE_CF_ROOT_DOCUMENT_NAME = "log_cache"; | ||
| public static final String API_HOST_PREFIX = "api."; | ||
| public static final String LOG_CACHE_PREFIX = "log-cache."; | ||
| public static final String ROOT_DOCUMENT_LINKS_LIST = "links"; | ||
|
|
||
| public static final String EMPTY_STRING = ""; | ||
| public static final String COLON = ":"; | ||
| public static final String PROTOCOL_SEPARATOR = "://"; | ||
|
|
||
| public static final String PACKAGE_LINK = "package"; | ||
| public static final String WEB_PROCESS_TYPE = "web"; | ||
|
|
||
| private Constants() { | ||
|
|
||
| } | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...-client/src/main/java/org/cloudfoundry/multiapps/controller/client/facade/AllowNulls.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| package org.cloudfoundry.multiapps.controller.client.facade; | ||
|
|
||
| import java.lang.annotation.ElementType; | ||
| import java.lang.annotation.Retention; | ||
| import java.lang.annotation.RetentionPolicy; | ||
| import java.lang.annotation.Target; | ||
|
|
||
| @Target(ElementType.METHOD) | ||
| @Retention(RetentionPolicy.CLASS) | ||
| public @interface AllowNulls { | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What the difference between this and nullable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well if talk about collections, if a map is declared as Nullable, this only tells us that we allow the whole map to be null, but if we need to allow for the values of a pair inside the map to hold a null, (for example "someKey" : null) - in order to achieve this we need this custom annotation AllowNulls, since before the migration we used the already provided one from the cf-java-client dependency. Thats how it was directly in the cf-java-client:
