[ 
https://issues.apache.org/jira/browse/GEODE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16304279#comment-16304279
 ] 

Cyrille Artho edited comment on GEODE-3584 at 1/5/18 2:16 AM:
--------------------------------------------------------------

Another view of the table, with the leftmost column simplified, so it fits more 
easily without horizontal scrolling:

||AbstractLauncher.java||LocatorLauncher.java||ServerLauncher.java||
| |static final Boolean DEFAULT_LOAD_SHARED_CONFIG_FROM_DIR|static final 
ServerLauncherCacheProvider DEFAULT_CACHE_PROVIDER|
| |*static final Map<String, String> helpMap = new HashMap<>()*|*static final 
Map<String, String> helpMap = new HashMap<>()*|
| |*static final Map<Command, String> usageMap = new TreeMap<>()*|*static final 
Map<Command, String> usageMap = new TreeMap<>()*|
| |*_static final String DEFAULT_LOCATOR_LOG_EXT = ".log"_*|*_static final 
String DEFAULT_SERVER_LOG_EXT = ".log"_*|
| |*_static final String DEFAULT_LOCATOR_LOG_NAME = "locator"_*|*_static final 
String DEFAULT_SERVER_LOG_NAME = "gemfire"_*|
| |*_static final String LOCATOR_SERVICE_NAME = "Locator"_*|*_static final 
String SERVER_SERVICE_NAME = "Server"_*|
| |*_static final AtomicReference<LocatorLauncher> INSTANCE = new 
AtomicReference<>()_*|*_static final AtomicReference<ServerLauncher> INSTANCE = 
new AtomicReference<>()_*|
|*volatile boolean debug*| |*volatile boolean debug*|
| |*_final transient ControlNotificationHandler controlHandler_*|*_final 
ControlNotificationHandler controlHandler_*|
|final transient AtomicBoolean running| | |
| |*final AtomicBoolean starting = new AtomicBoolean(false)*|*final 
AtomicBoolean starting = new AtomicBoolean(false)*|
|Logger logger| |final boolean assignBuckets|
| |*final boolean deletePidFileOnStop*|*final boolean deletePidFileOnStop*|
| | |final boolean disableDefaultServer|
| |*final boolean force*|*final boolean force*|
| |*final boolean help*|*final boolean help*|
| | |final boolean rebalance|
| |*final boolean redirectOutput*|*final boolean redirectOutput*|
| | |volatile Cache cache|
| | |final CacheConfig cacheConfig|
| |*final Command command*|*final Command command*|
| |*_final InetAddress bindAddress_*|*_final InetAddress serverBindAddress_*|
| |*final Integer pid*|*final Integer pid*|
| |*_final boolean portSpecified_*|*_final Integer serverPort_*|
| |*final Properties distributedSystemProperties*|*final Properties 
distributedSystemProperties*|
| |*final String memberName*|*final String memberName*|
| |final Integer port|final String springXmlLocation|
| |*final String workingDirectory*|*final String workingDirectory*|
| |*_transient volatile String statusMessage_*|*_volatile String 
statusMessage_*|
| | |final Float criticalHeapPercentage|
| | |final Float evictionHeapPercentage|
| | |final Float criticalOffHeapPercentage|
| | |final Float evictionOffHeapPercentage|
| |*final String hostnameForClients*|*final String hostNameForClients*|
| | |final Integer maxConnections|
| | |final Integer maxMessageCount|
| | |final Integer messageTimeToLive|
| | |final Integer socketBufferSize|
| | |final Integer maxThreads|
| |*_transient volatile ControllableProcess process_*|*_volatile 
ControllableProcess process_*|
| |*_final transient LocatorControllerParameters controllerParameters_*|*_final 
ServerControllerParameters controllerParameters_*|
| |transient volatile InternalLocator locator| |
| |final boolean workingDirectorySpecified| |
| |final boolean bindAddressSpecified| |



was (Author: telcontar):
Another view of the table, with the leftmost column simplified, so it fits more 
easily without horizontal scrolling:

||AbstractLauncher.java||LocatorLauncher.java||ServerLauncher.java||
| |static final Boolean DEFAULT_LOAD_SHARED_CONFIG_FROM_DIR|static final 
ServerLauncherCacheProvider DEFAULT_CACHE_PROVIDER|
| |*static final Map<String, String> helpMap = new HashMap<>()*|*static final 
Map<String, String> helpMap = new HashMap<>()*|
| |*static final Map<Command, String> usageMap = new TreeMap<>()*|*static final 
Map<Command, String> usageMap = new TreeMap<>()*|
| |*_static final String DEFAULT_LOCATOR_LOG_EXT = ".log"_*|*_static final 
String DEFAULT_SERVER_LOG_EXT = ".log"_*|
| |*_static final String DEFAULT_LOCATOR_LOG_NAME = "locator"_*|*_static final 
String DEFAULT_SERVER_LOG_NAME = "gemfire"_*|
| |*_static final String LOCATOR_SERVICE_NAME = "Locator"_*|*_static final 
String SERVER_SERVICE_NAME = "Server"_*|
| |*_static final AtomicReference<LocatorLauncher> INSTANCE = new 
AtomicReference<>()_*|*_static final AtomicReference<ServerLauncher> INSTANCE = 
new AtomicReference<>()_*|
|*volatile boolean debug*| |*volatile boolean debug*|
| |*_final transient ControlNotificationHandler controlHandler_*|*_final 
ControlNotificationHandler controlHandler_*|
|final transient AtomicBoolean running| | |
| |*final AtomicBoolean starting = new AtomicBoolean(false)*|*final 
AtomicBoolean starting = new AtomicBoolean(false)*|
|Logger logger| |final boolean assignBuckets|
| |*final boolean deletePidFileOnStop*|*final boolean deletePidFileOnStop*|
| | |final boolean disableDefaultServer|
| |*final boolean force*|*final boolean force*|
| |*final boolean help*|*final boolean help*|
| | |final boolean rebalance|
| |*final boolean redirectOutput*|*final boolean redirectOutput*|
| | |volatile Cache cache|
| | |final CacheConfig cacheConfig|
| |*final Command command*|*final Command command*|
| |*_final boolean bindAddressSpecified_*|*_final InetAddress 
serverBindAddress_*|
| |*final Integer pid*|*final Integer pid*|
| |*_final boolean portSpecified_*|*_final Integer serverPort_*|
| |*final Properties distributedSystemProperties*|*final Properties 
distributedSystemProperties*|
| |*final String memberName*|*final String memberName*|
| |final Integer port|final String springXmlLocation|
| |*final String workingDirectory*|*final String workingDirectory*|
| |*_transient volatile String statusMessage_*|*_volatile String 
statusMessage_*|
| | |final Float criticalHeapPercentage|
| | |final Float evictionHeapPercentage|
| | |final Float criticalOffHeapPercentage|
| | |final Float evictionOffHeapPercentage|
| |*final String hostnameForClients*|*final String hostNameForClients*|
| | |final Integer maxConnections|
| | |final Integer maxMessageCount|
| | |final Integer messageTimeToLive|
| | |final Integer socketBufferSize|
| | |final Integer maxThreads|
| |*_transient volatile ControllableProcess process_*|*_volatile 
ControllableProcess process_*|
| |*_final transient LocatorControllerParameters controllerParameters_*|*_final 
ServerControllerParameters controllerParameters_*|
| |transient volatile InternalLocator locator| |
| |final boolean workingDirectorySpecified| |
| |final InetAddress bindAddress| |


> Refactor ServerLauncher and LocatorLauncher to eliminate code duplication
> -------------------------------------------------------------------------
>
>                 Key: GEODE-3584
>                 URL: https://issues.apache.org/jira/browse/GEODE-3584
>             Project: Geode
>          Issue Type: Improvement
>          Components: gfsh
>    Affects Versions: 1.2.0
>            Reporter: Kenneth Howe
>         Attachments: GEODE-3584-WIP
>
>
> There is some duplication of code in the Launcher classes that can be 
> eliminated. Both classes have methods such as getBindAddress (called 
> getServerBindAddress in ServerLauncher) that could be hoisted into  
> AbstractLauncher class that they both extend. The same goes for the inner 
> State classes of the Launchers; they have methods that could be moved to 
> AbstractLauncher.ServiceState.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to