Skip to content
This repository
Browse code

Fix javadoc comments.

  • Loading branch information...
commit e6e92c9d41818681a01f709e33e0f22f35005cac 1 parent fa6ea73
authored

Showing 16 changed files with 241 additions and 120 deletions. Show diff stats Hide diff stats

  1. 4  eureka-client/src/main/java/com/netflix/appinfo/AmazonInfo.java
  2. 6  eureka-client/src/main/java/com/netflix/appinfo/ApplicationInfoManager.java
  3. 22  eureka-client/src/main/java/com/netflix/appinfo/EurekaInstanceConfig.java
  4. 4  eureka-client/src/main/java/com/netflix/appinfo/HealthCheckCallback.java
  5. 196  eureka-client/src/main/java/com/netflix/appinfo/InstanceInfo.java
  6. 77  eureka-client/src/main/java/com/netflix/appinfo/LeaseInfo.java
  7. 2  eureka-client/src/main/java/com/netflix/discovery/DefaultEurekaClientConfig.java
  8. 5  eureka-client/src/main/java/com/netflix/discovery/DiscoveryClient.java
  9. 2  eureka-client/src/main/java/com/netflix/discovery/DiscoveryManager.java
  10. 12  eureka-client/src/main/java/com/netflix/discovery/EurekaClientConfig.java
  11. 5  eureka-client/src/main/java/com/netflix/discovery/converters/Auto.java
  12. 7  eureka-client/src/main/java/com/netflix/discovery/converters/Converters.java
  13. 10  eureka-client/src/main/java/com/netflix/discovery/shared/Applications.java
  14. 1  eureka-client/src/main/java/com/netflix/discovery/shared/EurekaJerseyClient.java
  15. 4  eureka-client/src/main/java/com/netflix/discovery/shared/LookupService.java
  16. 4  eureka-server/WEB-INF/web.xml
4  eureka-client/src/main/java/com/netflix/appinfo/AmazonInfo.java
@@ -101,7 +101,9 @@ public Builder addMetadata(MetaDataKey key, String value) {
101 101
         }
102 102
 
103 103
         /**
104  
-         * Build the {@link InstanceInfo}
  104
+         * Build the {@link InstanceInfo} information.
  105
+         * 
  106
+         * @return AWS specific instance information.
105 107
          */
106 108
         public AmazonInfo build() {
107 109
             return result;
6  eureka-client/src/main/java/com/netflix/appinfo/ApplicationInfoManager.java
@@ -115,9 +115,11 @@ public InstanceInfo getInfo() {
115 115
     }
116 116
 
117 117
     /**
118  
-     * Register user-specific instance metadata. Application can send any other
119  
-     * additional metadata that need to be accessed for other reasons.The data
  118
+     * Register user-specific instance meta data. Application can send any other
  119
+     * additional meta data that need to be accessed for other reasons.The data
120 120
      * will be periodically sent to the eureka server.
  121
+     * 
  122
+     * @param appMetadata application specific meta data.
121 123
      */
122 124
     public void registerAppMetadata(Map<String, String> appMetadata) {
123 125
         instanceInfo.registerRuntimeMetadata(appMetadata);
22  eureka-client/src/main/java/com/netflix/appinfo/EurekaInstanceConfig.java
@@ -17,6 +17,8 @@
17 17
 
18 18
 import java.util.Map;
19 19
 
  20
+import com.netflix.discovery.DiscoveryClient;
  21
+
20 22
 /**
21 23
  * Configuration information required by the instance to register with Eureka
22 24
  * server. Once registered, users can look up information from
@@ -26,8 +28,8 @@
26 28
  * 
27 29
  * 
28 30
  * <p>
29  
- * Note that all configurations are not effective at runtime unless
30  
- * and otherwise specified.
  31
+ * Note that all configurations are not effective at runtime unless and
  32
+ * otherwise specified.
31 33
  * </p>
32 34
  * 
33 35
  * @author Karthik Ranganathan
@@ -93,7 +95,7 @@
93 95
      * 
94 96
      * <p>
95 97
      * Note that the instance could still not take traffic if it implements
96  
-     * {@link HealhCheckCallback} and then decides to make itself unavailable.
  98
+     * {@link HealthCheckCallback} and then decides to make itself unavailable.
97 99
      * </p>
98 100
      * 
99 101
      * @return time in seconds
@@ -114,7 +116,7 @@
114 116
      * .
115 117
      * </p>
116 118
      * 
117  
-     * @return
  119
+     * @return value indicating time in seconds.
118 120
      */
119 121
     int getLeaseExpirationDurationInSeconds();
120 122
 
@@ -128,7 +130,8 @@
128 130
      * this instance.
129 131
      * </p>
130 132
      * 
131  
-     * @return
  133
+     * @return the string indicating the virtual host name which the clients use
  134
+     *         to call this service.
132 135
      */
133 136
     String getVirtualHostName();
134 137
 
@@ -142,7 +145,8 @@
142 145
      * this instance.
143 146
      * </p>
144 147
      * 
145  
-     * @return
  148
+     * @return the string indicating the secure virtual host name which the clients use
  149
+     *         to call this service.
146 150
      */
147 151
     String getSecureVirtualHostName();
148 152
 
@@ -160,7 +164,9 @@
160 164
      * Gets the hostname associated with this instance. This is the exact name
161 165
      * that would be used by other instances to make calls.
162 166
      * 
163  
-     * @param refresh true if the information needs to be refetched, false otherwise.
  167
+     * @param refresh
  168
+     *            true if the information needs to be refetched, false
  169
+     *            otherwise.
164 170
      * @return hostname of this instance which is identifiable by other
165 171
      *         instances for making remote calls.
166 172
      */
@@ -187,7 +193,7 @@
187 193
     /**
188 194
      * Get the IPAdress of the instance. This information is for academic
189 195
      * purposes only as the communication from other instances primarily happen
190  
-     * using the information supplied in {@link #getHostName()}.
  196
+     * using the information supplied in {@link #getHostName(boolean)}.
191 197
      * 
192 198
      * @return the ip address of this instance.
193 199
      */
4  eureka-client/src/main/java/com/netflix/appinfo/HealthCheckCallback.java
@@ -46,7 +46,9 @@
46 46
      * {@link InstanceInfo.InstanceStatus#DOWN} with eureka. If the instance was
47 47
      * already marked {@link InstanceInfo.InstanceStatus#DOWN} , returning true
48 48
      * here will mark the instance back to
49  
-     * {@link InstanceInfo.InstanceStatus#UP}
  49
+     * {@link InstanceInfo.InstanceStatus#UP}.
  50
+     * 
  51
+     * @return true if the call back returns healthy, false otherwise.
50 52
      */
51 53
     boolean isHealthy();
52 54
 }
196  eureka-client/src/main/java/com/netflix/appinfo/InstanceInfo.java
@@ -207,12 +207,17 @@ public Builder setAppName(String appName) {
207 207
          * Sets the fully qualified hostname of this running instance.This is
208 208
          * mostly used in constructing the {@link URL} for communicating with
209 209
          * the instance.
  210
+         * 
  211
+         * @param hostName
  212
+         *            the host name of the instance.
  213
+         * @return the {@link InstanceInfo} builder.
210 214
          */
211 215
         public Builder setHostName(String hostName) {
212 216
             String existingHostName = result.hostName;
213 217
             result.hostName = hostName;
214  
-            if ((existingHostName != null) && !(hostName.equals(existingHostName))) {
215  
-                 refreshStatusPageUrl().refreshHealthCheckUrl()
  218
+            if ((existingHostName != null)
  219
+                    && !(hostName.equals(existingHostName))) {
  220
+                refreshStatusPageUrl().refreshHealthCheckUrl()
216 221
                 .refreshVIPAddress().refreshSecureVIPAddress();
217 222
             }
218 223
             return this;
@@ -221,6 +226,10 @@ public Builder setHostName(String hostName) {
221 226
         /**
222 227
          * Sets the status of the instances.If the status is UP, that is when
223 228
          * the instance is ready to service requests.
  229
+         * 
  230
+         * @param status
  231
+         *            the {@link InstanceStatus} of the instance.
  232
+         * @return the {@link InstanceInfo} builder.
224 233
          */
225 234
         public Builder setStatus(InstanceStatus status) {
226 235
             result.status = status;
@@ -231,6 +240,10 @@ public Builder setStatus(InstanceStatus status) {
231 240
          * Sets the status overridden by some other external process.This is
232 241
          * mostly used in putting an instance out of service to block traffic to
233 242
          * it.
  243
+         * 
  244
+         * @param status
  245
+         *            the overridden {@link InstanceStatus} of the instance.
  246
+         * @return @return the {@link InstanceInfo} builder.
234 247
          */
235 248
         public Builder setOverriddenStatus(InstanceStatus status) {
236 249
             result.overriddenstatus = status;
@@ -239,15 +252,22 @@ public Builder setOverriddenStatus(InstanceStatus status) {
239 252
 
240 253
         /**
241 254
          * Sets the ip address of this running instance.
  255
+         * 
  256
+         * @param ip
  257
+         *            the ip address of the instance.
  258
+         * @return the {@link InstanceInfo} builder.
242 259
          */
243 260
         public Builder setIPAddr(String ip) {
244 261
             result.ipAddr = ip;
245 262
             return this;
246 263
         }
247 264
 
248  
-
249 265
         /**
250 266
          * Sets the identity of this application instance.
  267
+         * 
  268
+         * @param sid
  269
+         *            the sid of the instance.
  270
+         * @return the {@link InstanceInfo} builder.
251 271
          */
252 272
         @Deprecated
253 273
         public Builder setSID(String sid) {
@@ -257,6 +277,10 @@ public Builder setSID(String sid) {
257 277
 
258 278
         /**
259 279
          * Sets the port number that is used to service requests.
  280
+         * 
  281
+         * @param port
  282
+         *            the port number that is used to service requests.
  283
+         * @return the {@link InstanceInfo} builder.
260 284
          */
261 285
         public Builder setPort(int port) {
262 286
             result.port = port;
@@ -264,7 +288,11 @@ public Builder setPort(int port) {
264 288
         }
265 289
 
266 290
         /**
267  
-         * Sets the secured port that is used to service requests.
  291
+         * Sets the secure port that is used to service requests.
  292
+         * 
  293
+         * @param port
  294
+         *            the secure port that is used to service requests.
  295
+         * @return the {@link InstanceInfo} builder.
268 296
          */
269 297
         public Builder setSecurePort(int port) {
270 298
             result.securePort = port;
@@ -309,8 +337,9 @@ public Builder setCountryId(int id) {
309 337
          * ${netflix.appinfo.hostname} is replaced at runtime.
310 338
          * </p>
311 339
          * 
312  
-         * @param homePageUrlPath
313  
-         *            - The {@link URL} path for home page for this instance
  340
+         * @param relativeUrl
  341
+         *            the relative url path of the home page.
  342
+         * 
314 343
          * @param explicitUrl
315 344
          *            - The full {@link URL} for the home page
316 345
          * @return the instance builder.
@@ -378,8 +407,8 @@ public Builder setStatusPageUrl(String relativeUrl, String explicitUrl) {
378 407
          *            instance.
379 408
          * @param explicitUrl
380 409
          *            - The full {@link URL} for the healthcheck page.
381  
-         * @param securehealthCheckUrl
382  
-         *            - The full {@link URL} for the secure healthcheck page.
  410
+         * @param secureExplicitUrl
  411
+         *            the full secure explicit url of ht healthcheck page.
383 412
          * @return the instance builder
384 413
          */
385 414
         public Builder setHealthCheckUrls(String relativeUrl,
@@ -427,8 +456,9 @@ public Builder setVIPAddress(String vipAddress) {
427 456
          * needs to be resolved into a real address for communicating with this
428 457
          * instance.
429 458
          * 
430  
-         * @param secureVipAddress
431  
-         *            - The Virtual Internet Protocol address of this instance
  459
+         * @param secureVIPAddress
  460
+         *            the secure VIP address of the instance.
  461
+         * 
432 462
          * @return - Builder instance
433 463
          */
434 464
         public Builder setSecureVIPAddress(String secureVIPAddress) {
@@ -439,6 +469,11 @@ public Builder setSecureVIPAddress(String secureVIPAddress) {
439 469
 
440 470
         /**
441 471
          * Sets the datacenter information.
  472
+         * 
  473
+         * @param datacenter
  474
+         *            the datacenter information for where this instance is
  475
+         *            running.
  476
+         * @return the {@link InstanceInfo} builder.
442 477
          */
443 478
         public Builder setDataCenterInfo(DataCenterInfo datacenter) {
444 479
             result.dataCenterInfo = datacenter;
@@ -457,6 +492,12 @@ public void setLeaseInfo(LeaseInfo info) {
457 492
 
458 493
         /**
459 494
          * Add arbitrary metadata to running instance
  495
+         * 
  496
+         * @param key
  497
+         *            The key of the metadata.
  498
+         * @param val
  499
+         *            The value of the metadata.
  500
+         * @return the {@link InstanceInfo} builder.
460 501
          */
461 502
         public Builder add(String key, String val) {
462 503
             result.metadata.put(key, val);
@@ -486,6 +527,9 @@ public InstanceInfo getRawInstance() {
486 527
 
487 528
         /**
488 529
          * Build the {@link InstanceInfo} object.
  530
+         * 
  531
+         * @return the {@link InstanceInfo} that was built based on the
  532
+         *         information supplied.
489 533
          */
490 534
         public InstanceInfo build() {
491 535
             if (!isInitialized()) {
@@ -537,13 +581,16 @@ private Builder refreshVIPAddress() {
537 581
 
538 582
     /**
539 583
      * Return the name of the application registering with discovery.
  584
+     * 
  585
+     * @return the string denoting the application name.
540 586
      */
541 587
     public String getAppName() {
542 588
         return appName;
543 589
     }
544  
-   
  590
+
545 591
     /**
546 592
      * Returns the fully qualified hostname of this running instance
  593
+     * 
547 594
      * @return the hostname.
548 595
      */
549 596
     public String getHostName() {
@@ -562,8 +609,9 @@ public String getSID() {
562 609
     }
563 610
 
564 611
     /**
565  
-     *
  612
+     * 
566 613
      * Returns the unique id of the instance.
  614
+     * 
567 615
      * @return the unique id.
568 616
      */
569 617
     public String getId() {
@@ -576,6 +624,7 @@ public String getId() {
576 624
 
577 625
     /**
578 626
      * Returns the ip address of the instance.
  627
+     * 
579 628
      * @return - the ip address, in AWS scenario it is a private IP.
580 629
      */
581 630
     public String getIPAddr() {
@@ -583,17 +632,18 @@ public String getIPAddr() {
583 632
     }
584 633
 
585 634
     /**
586  
-     *
  635
+     * 
587 636
      * Returns the port number that is used for servicing requests.
  637
+     * 
588 638
      * @return - the non-secure port number.
589 639
      */
590 640
     public int getPort() {
591 641
         return port;
592 642
     }
593 643
 
594  
-    
595 644
     /**
596 645
      * Returns the status of the instance.
  646
+     * 
597 647
      * @return the status indicating whether the instance can handle requests.
598 648
      */
599 649
     public InstanceStatus getStatus() {
@@ -602,31 +652,37 @@ public InstanceStatus getStatus() {
602 652
 
603 653
     /**
604 654
      * Returns the overridden status if any of the instance.
605  
-     * @return the status indicating whether an external process has changed the status.
  655
+     * 
  656
+     * @return the status indicating whether an external process has changed the
  657
+     *         status.
606 658
      */
607 659
     public InstanceStatus getOverriddenStatus() {
608 660
         return overriddenstatus;
609 661
     }
610 662
 
611  
-   /**
612  
-    * Returns data center information identifying if it is AWS or not.
613  
-    * @return the data center information.
614  
-    */
  663
+    /**
  664
+     * Returns data center information identifying if it is AWS or not.
  665
+     * 
  666
+     * @return the data center information.
  667
+     */
615 668
     public DataCenterInfo getDataCenterInfo() {
616 669
         return dataCenterInfo;
617 670
     }
618 671
 
619  
-   /**
620  
-    * Returns the lease information regarding when it expires.
621  
-    * @return the lease information of this instance.
622  
-    */
  672
+    /**
  673
+     * Returns the lease information regarding when it expires.
  674
+     * 
  675
+     * @return the lease information of this instance.
  676
+     */
623 677
     public LeaseInfo getLeaseInfo() {
624 678
         return leaseInfo;
625 679
     }
626 680
 
627 681
     /**
628 682
      * Sets the lease information regarding when it expires.
629  
-     * @param info the lease information of this instance.
  683
+     * 
  684
+     * @param info
  685
+     *            the lease information of this instance.
630 686
      */
631 687
     public void setLeaseInfo(LeaseInfo info) {
632 688
         leaseInfo = info;
@@ -634,6 +690,7 @@ public void setLeaseInfo(LeaseInfo info) {
634 690
 
635 691
     /**
636 692
      * Returns all application specific metadata set on the instance.
  693
+     * 
637 694
      * @return application specific metadata.
638 695
      */
639 696
     public Map<String, String> getMetadata() {
@@ -647,6 +704,7 @@ public int getCountryId() {
647 704
 
648 705
     /**
649 706
      * Returns the secure port that is used for servicing requests.
  707
+     * 
650 708
      * @return the secure port.
651 709
      */
652 710
     public int getSecurePort() {
@@ -655,7 +713,9 @@ public int getSecurePort() {
655 713
 
656 714
     /**
657 715
      * Checks whether a port is enabled for traffic or not.
658  
-     * @param type indicates whether it is secure or non-secure port.
  716
+     * 
  717
+     * @param type
  718
+     *            indicates whether it is secure or non-secure port.
659 719
      * @return true if the port is enabled, false otherwise.
660 720
      */
661 721
     public boolean isPortEnabled(PortType type) {
@@ -667,12 +727,16 @@ public boolean isPortEnabled(PortType type) {
667 727
     }
668 728
 
669 729
     /**
670  
-     * Returns the time elapsed since epoch since the instance status has been last updated.
671  
-     * @return the time elapsed since epoch since the instance has been last updated.
  730
+     * Returns the time elapsed since epoch since the instance status has been
  731
+     * last updated.
  732
+     * 
  733
+     * @return the time elapsed since epoch since the instance has been last
  734
+     *         updated.
672 735
      */
673 736
     public long getLastUpdatedTimestamp() {
674 737
         return lastUpdatedTimestamp;
675 738
     }
  739
+
676 740
     /**
677 741
      * Set the update time for this instance when the status was update.
678 742
      */
@@ -682,14 +746,16 @@ public void setLastUpdatedTimestamp() {
682 746
 
683 747
     /**
684 748
      * Gets the home page {@link URL} set for this instance.
  749
+     * 
685 750
      * @return home page {@link URL}
686 751
      */
687 752
     public String getHomePageUrl() {
688 753
         return homePageUrl;
689 754
     }
690  
-    
  755
+
691 756
     /**
692 757
      * Gets the status page {@link URL} set for this instance.
  758
+     * 
693 759
      * @return status page {@link URL}
694 760
      */
695 761
     public String getStatusPageUrl() {
@@ -701,7 +767,7 @@ public String getStatusPageUrl() {
701 767
      * non-secure protocols. If the port is not enabled then the URL is
702 768
      * excluded.
703 769
      * 
704  
-     * @return  A Set containing the string representation of health check urls
  770
+     * @return A Set containing the string representation of health check urls
705 771
      *         for secure and non secure protocols
706 772
      */
707 773
     public Set<String> getHealthCheckUrls() {
@@ -737,6 +803,7 @@ public String getSecureVipAddress() {
737 803
 
738 804
     /**
739 805
      * Gets the last time stamp when this instance was touched.
  806
+     * 
740 807
      * @return last timestamp when this instance was touched.
741 808
      */
742 809
     public Long getLastDirtyTimestamp() {
@@ -745,7 +812,9 @@ public Long getLastDirtyTimestamp() {
745 812
 
746 813
     /**
747 814
      * Set the time indicating that the instance was touched.
748  
-     * @param lastDirtyTimestamp time when the instance was touched.
  815
+     * 
  816
+     * @param lastDirtyTimestamp
  817
+     *            time when the instance was touched.
749 818
      */
750 819
     public void setLastDirtyTimestamp(Long lastDirtyTimestamp) {
751 820
         this.lastDirtyTimestamp = lastDirtyTimestamp;
@@ -753,7 +822,9 @@ public void setLastDirtyTimestamp(Long lastDirtyTimestamp) {
753 822
 
754 823
     /**
755 824
      * Set the status for this instance.
756  
-     * @param status status for this instance.
  825
+     * 
  826
+     * @param status
  827
+     *            status for this instance.
757 828
      */
758 829
     public synchronized void setStatus(InstanceStatus status) {
759 830
         if (this.status != status) {
@@ -761,10 +832,12 @@ public synchronized void setStatus(InstanceStatus status) {
761 832
             setIsDirty(true);
762 833
         }
763 834
     }
764  
-    
  835
+
765 836
     /**
766 837
      * Set the status for this instance without updating the dirty timestamp.
767  
-     * @param status status for this instance.
  838
+     * 
  839
+     * @param status
  840
+     *            status for this instance.
768 841
      */
769 842
     public synchronized void setStatusWithoutDirty(InstanceStatus status) {
770 843
         if (this.status != status) {
@@ -773,9 +846,11 @@ public synchronized void setStatusWithoutDirty(InstanceStatus status) {
773 846
     }
774 847
 
775 848
     /**
776  
-     * Sets the overridden status for this instance.Normally set by an external process
777  
-     * to disable instance from taking traffic.
778  
-     * @param status overridden status for this instance.
  849
+     * Sets the overridden status for this instance.Normally set by an external
  850
+     * process to disable instance from taking traffic.
  851
+     * 
  852
+     * @param status
  853
+     *            overridden status for this instance.
779 854
      */
780 855
     public synchronized void setOverriddenStatus(InstanceStatus status) {
781 856
         if (this.overriddenstatus != status) {
@@ -783,19 +858,22 @@ public synchronized void setOverriddenStatus(InstanceStatus status) {
783 858
         }
784 859
     }
785 860
 
786  
-  
787 861
     /**
788 862
      * Returns whether any state changed so that {@link DiscoveryClient} can
789 863
      * check whether to retransmit info or not on the next heartbeat.
  864
+     * 
  865
+     * @return true if the {@link InstanceInfo} is dirty, false otherwise.
790 866
      */
791 867
     public boolean isDirty() {
792 868
         return isInstanceInfoDirty;
793 869
     }
794 870
 
795 871
     /**
796  
-     * Sets the dirty flag so that the instance information can be carried to the
797  
-     * discovery server on the next heartbeat.
798  
-     * @param b - true if dirty, false otherwise.
  872
+     * Sets the dirty flag so that the instance information can be carried to
  873
+     * the discovery server on the next heartbeat.
  874
+     * 
  875
+     * @param b
  876
+     *            - true if dirty, false otherwise.
799 877
      */
800 878
     public void setIsDirty(boolean b) {
801 879
         isInstanceInfoDirty = b;
@@ -829,10 +907,11 @@ public Boolean isCoordinatingDiscoveryServer() {
829 907
         return isCoordinatingDiscoveryServer;
830 908
     }
831 909
 
832  
-    
833 910
     /**
834  
-     * Returns the type of action done on the instance in the server.Primarily used for
835  
-     * updating deltas in the {@DiscoveryClient} instance.
  911
+     * Returns the type of action done on the instance in the server.Primarily
  912
+     * used for updating deltas in the {@DiscoveryClient}
  913
+     * instance.
  914
+     * 
836 915
      * @return action type done on the instance.
837 916
      */
838 917
     public ActionType getActionType() {
@@ -841,7 +920,9 @@ public ActionType getActionType() {
841 920
 
842 921
     /**
843 922
      * Set the action type performed on this instance in the server.
844  
-     * @param actionType action type done on the instance.
  923
+     * 
  924
+     * @param actionType
  925
+     *            action type done on the instance.
845 926
      */
846 927
     public void setActionType(ActionType actionType) {
847 928
         this.actionType = actionType;
@@ -849,6 +930,7 @@ public void setActionType(ActionType actionType) {
849 930
 
850 931
     /**
851 932
      * Get AWS autoscaling group name if any.
  933
+     * 
852 934
      * @return autoscaling group name of this instance.
853 935
      */
854 936
     public String getASGName() {
@@ -857,6 +939,8 @@ public String getASGName() {
857 939
 
858 940
     /**
859 941
      * Returns the specification version of this application
  942
+     * 
  943
+     * @return the string indicating the version of the application.
860 944
      */
861 945
     @Deprecated
862 946
     public String getVersion() {
@@ -864,14 +948,18 @@ public String getVersion() {
864 948
     }
865 949
 
866 950
     public enum ActionType {
867  
-        ADDED,  // Added in the discovery server
  951
+        ADDED, // Added in the discovery server
868 952
         MODIFIED, // Changed in the discovery server
869  
-        DELETED //Deleted from the discovery server
  953
+        DELETED
  954
+        // Deleted from the discovery server
870 955
     }
871 956
 
872 957
     /**
873  
-     * Register application specific metadata to be sent to the discovery server.
874  
-     * @param runtimeMetadata Map containing key/value pairs.
  958
+     * Register application specific metadata to be sent to the discovery
  959
+     * server.
  960
+     * 
  961
+     * @param runtimeMetadata
  962
+     *            Map containing key/value pairs.
875 963
      */
876 964
     synchronized void registerRuntimeMetadata(
877 965
             Map<String, String> runtimeMetadata) {
@@ -880,9 +968,13 @@ synchronized void registerRuntimeMetadata(
880 968
     }
881 969
 
882 970
     /**
883  
-     * Convert <code>VIPAddress</code> by substituting environment variables if necessary.
884  
-     * @param vipAddressMacro the macro for which the interpolation needs to be made.
885  
-     * @return a string representing the final <code>VIPAddress</code> after substitution.
  971
+     * Convert <code>VIPAddress</code> by substituting environment variables if
  972
+     * necessary.
  973
+     * 
  974
+     * @param vipAddressMacro
  975
+     *            the macro for which the interpolation needs to be made.
  976
+     * @return a string representing the final <code>VIPAddress</code> after
  977
+     *         substitution.
886 978
      */
887 979
     private static String resolveDeploymentContextBasedVipAddresses(
888 980
             String vipAddressMacro) {
@@ -908,5 +1000,5 @@ private static String resolveDeploymentContextBasedVipAddresses(
908 1000
 
909 1001
         return result;
910 1002
     }
911  
-    
  1003
+
912 1004
 }
77  eureka-client/src/main/java/com/netflix/appinfo/LeaseInfo.java
@@ -33,6 +33,19 @@
33 33
  */
34 34
 public class LeaseInfo {
35 35
 
  36
+    public static final int DEFAULT_LEASE_RENEWAL_INTERVAL = 30;
  37
+    public static final int DEFAULT_LEASE_DURATION = 90;
  38
+
  39
+    // Client settings
  40
+    private int renewalIntervalInSecs = DEFAULT_LEASE_RENEWAL_INTERVAL;
  41
+    private int durationInSecs = DEFAULT_LEASE_DURATION;
  42
+
  43
+    // Server populated
  44
+    private long registrationTimestamp;
  45
+    private long lastRenewalTimestamp;
  46
+    private long evictionTimestamp;
  47
+    private long clock;
  48
+
36 49
     public static final class Builder {
37 50
 
38 51
         @XStreamOmitField
@@ -48,6 +61,10 @@ public static Builder newBuilder() {
48 61
 
49 62
         /**
50 63
          * Sets the registration timestamp
  64
+         * 
  65
+         * @param ts
  66
+         *            time when the lease was first registered.
  67
+         * @return the {@link LeaseInfo} builder.
51 68
          */
52 69
         public Builder setRegistrationTimestamp(long ts) {
53 70
             result.registrationTimestamp = ts;
@@ -56,6 +73,10 @@ public Builder setRegistrationTimestamp(long ts) {
56 73
 
57 74
         /**
58 75
          * Sets the last renewal timestamp of lease
  76
+         * 
  77
+         * @param ts
  78
+         *            time when the lease was last renewed.
  79
+         * @return the {@link LeaseInfo} builder.
59 80
          */
60 81
         public Builder setRenewalTimestamp(long ts) {
61 82
             result.lastRenewalTimestamp = ts;
@@ -64,6 +85,10 @@ public Builder setRenewalTimestamp(long ts) {
64 85
 
65 86
         /**
66 87
          * Sets the de-registration timestamp
  88
+         * 
  89
+         * @param ts
  90
+         *            time when the lease was removed.
  91
+         * @return the {@link LeaseInfo} builder.
67 92
          */
68 93
         public Builder setEvictionTimestamp(long ts) {
69 94
             result.evictionTimestamp = ts;
@@ -72,7 +97,12 @@ public Builder setEvictionTimestamp(long ts) {
72 97
 
73 98
         /**
74 99
          * Sets the client specified setting for eviction (e.g. how long to wait
75  
-         * w/o renewal event)
  100
+         * without renewal event)
  101
+         * 
  102
+         * @param d
  103
+         *            time in seconds after which the lease would expire without
  104
+         *            renewa.
  105
+         * @return the {@link LeaseInfo} builder.
76 106
          */
77 107
         public Builder setDurationInSecs(int d) {
78 108
             if (d <= 0) {
@@ -85,6 +115,10 @@ public Builder setDurationInSecs(int d) {
85 115
 
86 116
         /**
87 117
          * Sets the client specified setting for renew interval
  118
+         * 
  119
+         * @param i
  120
+         *            the time interval with which the renewals will be renewed.
  121
+         * @return the {@link LeaseInfo} builder.
88 122
          */
89 123
         public Builder setRenewalIntervalInSecs(int i) {
90 124
             if (i <= 0) {
@@ -96,39 +130,23 @@ public Builder setRenewalIntervalInSecs(int i) {
96 130
         }
97 131
 
98 132
         /**
99  
-         * Sets the logical clock
100  
-         */
101  
-        public Builder setClock(long clock) {
102  
-            result.clock = clock;
103  
-            return this;
104  
-        }
105  
-
106  
-        /**
107 133
          * Build the {@link InstanceInfo}
  134
+         * 
  135
+         * @return the {@link LeaseInfo} information built based on the supplied
  136
+         *         information.
108 137
          */
109 138
         public LeaseInfo build() {
110 139
             return result;
111 140
         }
112 141
     }
113 142
 
114  
-    public static final int DEFAULT_LEASE_RENEWAL_INTERVAL = 30;
115  
-    public static final int DEFAULT_LEASE_DURATION = 90;
116  
-
117  
-    // Client settings
118  
-    private int renewalIntervalInSecs = DEFAULT_LEASE_RENEWAL_INTERVAL;
119  
-    private int durationInSecs = DEFAULT_LEASE_DURATION;
120  
-
121  
-    // Server populated
122  
-    private long registrationTimestamp;
123  
-    private long lastRenewalTimestamp;
124  
-    private long evictionTimestamp;
125  
-    private long clock;
126  
-
127 143
     private LeaseInfo() {
128 144
     }
129 145
 
130 146
     /**
131 147
      * Returns the registration timestamp
  148
+     * 
  149
+     * @return time in milliseconds since epoch.
132 150
      */
133 151
     public long getRegistrationTimestamp() {
134 152
         return registrationTimestamp;
@@ -136,6 +154,8 @@ public long getRegistrationTimestamp() {
136 154
 
137 155
     /**
138 156
      * Returns the last renewal timestamp of lease
  157
+     * 
  158
+     * @return time in milliseconds since epoch.
139 159
      */
140 160
     public long getRenewalTimestamp() {
141 161
         return lastRenewalTimestamp;
@@ -143,6 +163,8 @@ public long getRenewalTimestamp() {
143 163
 
144 164
     /**
145 165
      * Returns the de-registration timestamp
  166
+     * 
  167
+     * @return time in milliseconds since epoch.
146 168
      */
147 169
     public long getEvictionTimestamp() {
148 170
         return evictionTimestamp;
@@ -150,6 +172,8 @@ public long getEvictionTimestamp() {
150 172
 
151 173
     /**
152 174
      * Returns client specified setting for renew interval
  175
+     * 
  176
+     * @return time in milliseconds since epoch.
153 177
      */
154 178
     public int getRenewalIntervalInSecs() {
155 179
         return renewalIntervalInSecs;
@@ -158,16 +182,11 @@ public int getRenewalIntervalInSecs() {
158 182
     /**
159 183
      * Returns client specified setting for eviction (e.g. how long to wait w/o
160 184
      * renewal event)
  185
+     * 
  186
+     * @return time in milliseconds since epoch.
161 187
      */
162 188
     public int getDurationInSecs() {
163 189
         return durationInSecs;
164 190
     }
165 191
 
166  
-    /**
167  
-     * Returns the logical clock
168  
-     */
169  
-    public long getClock() {
170  
-        return clock;
171  
-    }
172  
-
173 192
 }
2  eureka-client/src/main/java/com/netflix/discovery/DefaultEurekaClientConfig.java
@@ -19,9 +19,7 @@
19 19
 import java.io.IOException;
20 20
 import java.util.ArrayList;
21 21
 import java.util.Arrays;
22  
-import java.util.LinkedHashMap;
23 22
 import java.util.List;
24  
-import java.util.Map;
25 23
 
26 24
 import org.slf4j.Logger;
27 25
 import org.slf4j.LoggerFactory;
5  eureka-client/src/main/java/com/netflix/discovery/DiscoveryClient.java
@@ -207,10 +207,9 @@
207 207
         }
208 208
     }
209 209
 
210  
-    /**
  210
+    /*
211 211
      * (non-Javadoc)
212  
-     * 
213  
-     * @see com.netflix.discovery.shared.LookupService#getApplication(T)
  212
+     * @see com.netflix.discovery.shared.LookupService#getApplication(java.lang.String)
214 213
      */
215 214
     public Application getApplication(String appName) {
216 215
         return getApplications().getRegisteredApplications(appName);
2  eureka-client/src/main/java/com/netflix/discovery/DiscoveryManager.java
@@ -59,6 +59,7 @@ public static DiscoveryManager getInstance() {
59 59
      * @param config
60 60
      *            the instance info configuration that will be used for
61 61
      *            registration with Eureka.
  62
+     * @param eurekaConfig the eureka client configuration of the instance.
62 63
      */
63 64
     public void initComponent(EurekaInstanceConfig config,
64 65
             EurekaClientConfig eurekaConfig) {
@@ -91,6 +92,7 @@ public LookupService getLookupService() {
91 92
 
92 93
     /**
93 94
      * Get the {@link DiscoveryClient}
  95
+     * @return the client that is used to talk to eureka.
94 96
      */
95 97
     public DiscoveryClient getDiscoveryClient() {
96 98
         return discoveryClient;
12  eureka-client/src/main/java/com/netflix/discovery/EurekaClientConfig.java
@@ -165,7 +165,7 @@
165 165
      * Gets the URL context to be used to construct the <em>service url</em> to
166 166
      * contact eureka server when the list of eureka servers come from the
167 167
      * DNS.This information is not required if the contract returns the service
168  
-     * urls by implementing {@link #getEurekaServerServiceUrls()}.
  168
+     * urls by implementing {@link #getEurekaServerServiceUrls(String)}.
169 169
      * 
170 170
      * <p>
171 171
      * The DNS mechanism is used when
@@ -187,7 +187,7 @@
187 187
      * Gets the port to be used to construct the <em>service url</em> to contact
188 188
      * eureka server when the list of eureka servers come from the DNS.This
189 189
      * information is not required if the contract returns the service urls by
190  
-     * implementing {@link #getEurekaServerServiceUrls()}.
  190
+     * implementing {@link #getEurekaServerServiceUrls(String)}.
191 191
      * 
192 192
      * <p>
193 193
      * The DNS mechanism is used when
@@ -208,7 +208,7 @@
208 208
     /**
209 209
      * Gets the DNS name to be queried to get the list of eureka servers.This
210 210
      * information is not required if the contract returns the service urls by
211  
-     * implementing {@link #getEurekaServerServiceUrls()}.
  211
+     * implementing {@link #getEurekaServerServiceUrls(String)}.
212 212
      * 
213 213
      * <p>
214 214
      * The DNS mechanism is used when
@@ -235,7 +235,7 @@
235 235
      * 
236 236
      * <p>
237 237
      * Alternatively, the service urls can be returned
238  
-     * {@link #getEurekaServerServiceUrls()}, but the users should implement
  238
+     * {@link #getEurekaServerServiceUrls(String)}, but the users should implement
239 239
      * their own mechanism to return the updated list in case of changes.
240 240
      * </p>
241 241
      * 
@@ -243,7 +243,7 @@
243 243
      * <em>The changes are effective at runtime.</em>
244 244
      * </p>
245 245
      * 
246  
-     * @return
  246
+     * @return true if the DNS mechanism should be used for fetching urls, false otherwise.
247 247
      */
248 248
     boolean shouldUseDnsForFetchingServiceUrls();
249 249
 
@@ -337,6 +337,7 @@
337 337
      * <p>
338 338
      * <em>The changes are effective at runtime at the next registry fetch cycle as specified by {@link #getRegistryFetchIntervalSeconds()}</em>
339 339
      * </p>
  340
+     * @param region the region where this instance is deployed.
340 341
      * 
341 342
      * @return the list of available zones accessible by this instance.
342 343
      */
@@ -355,6 +356,7 @@
355 356
      * <p>
356 357
      * <em>The changes are effective at runtime at the next service url refresh cycle as specified by {@link #getEurekaServiceUrlPollIntervalSeconds()}</em>
357 358
      * </p>
  359
+     * @param myZone the zone in which the instance is deployed.
358 360
      * 
359 361
      * @return the list of eureka server service urls for eureka clients to talk
360 362
      *         to.
5  eureka-client/src/main/java/com/netflix/discovery/converters/Auto.java
@@ -21,10 +21,13 @@
21 21
 import java.lang.annotation.RetentionPolicy;
22 22
 import java.lang.annotation.Target;
23 23
 
  24
+import com.netflix.appinfo.InstanceInfo;
  25
+import com.netflix.discovery.converters.Converters.InstanceInfoConverter;
  26
+
24 27
 /**
25 28
  * A field annotation which helps in avoiding changes to
26 29
  * {@link InstanceInfoConverter} every time additional fields are added to
27  
- * {@InstanceInfo}.
  30
+ * {@link InstanceInfo}.
28 31
  * 
29 32
  * <p>
30 33
  * This annotation informs the {@link InstanceInfoConverter} to automatically
7  eureka-client/src/main/java/com/netflix/discovery/converters/Converters.java
@@ -571,9 +571,6 @@ public void marshal(Object source, HierarchicalStreamWriter writer,
571 571
             writer.setValue(String.valueOf(info.getEvictionTimestamp()));
572 572
             writer.endNode();
573 573
 
574  
-            writer.startNode(ELEM_CLOCK);
575  
-            writer.setValue(String.valueOf(info.getClock()));
576  
-            writer.endNode();
577 574
         }
578 575
 
579 576
         /*
@@ -606,9 +603,7 @@ public Object unmarshal(HierarchicalStreamReader reader,
606 603
                     continue;
607 604
                 }
608 605
 
609  
-                if (ELEM_CLOCK.equals(nodeName)) {
610  
-                    builder.setClock(longValue);
611  
-                } else if (ELEM_DURATION.equals(nodeName)) {
  606
+                if (ELEM_DURATION.equals(nodeName)) {
612 607
                     builder.setDurationInSecs((int) longValue);
613 608
                 } else if (ELEM_EVICTION_TIMESTAMP.equals(nodeName)) {
614 609
                     builder.setEvictionTimestamp(longValue);
10  eureka-client/src/main/java/com/netflix/discovery/shared/Applications.java
@@ -155,7 +155,7 @@ public Application getRegisteredApplications(String appName) {
155 155
      * Gets the list of secure <em>instances</em> associated to a virtual host
156 156
      * name.
157 157
      * 
158  
-     * @param virtualHostName
  158
+     * @param secureVirtualHostName
159 159
      *            the virtual hostname for which the secure instances need to be
160 160
      *            returned.
161 161
      * @return list of <em>instances</em>.
@@ -192,18 +192,18 @@ public void setAppsHashCode(String hashCode) {
192 192
 
193 193
     /**
194 194
      * Used by the eureka server. Not for external use.
195  
-     * 
196  
-     * @param hashCode
  195
+     * @return the string indicating the hashcode based on the applications stored.
  196
+     *
197 197
      */
198 198
     public String getAppsHashCode() {
199 199
         return this.appsHashCode;
200 200
     }
201 201
 
202 202
     /**
203  
-     * Gets the hashcode for this <em>applications</em> instance. Used for
  203
+     * Gets the hash code for this <em>applications</em> instance. Used for
204 204
      * comparison of instances between eureka server and eureka client.
205 205
      * 
206  
-     * @return the internal hashcode representation indicating the information
  206
+     * @return the internal hash code representation indicating the information
207 207
      *         about the instances.
208 208
      */
209 209
     public String getReconcileHashCode() {
1  eureka-client/src/main/java/com/netflix/discovery/shared/EurekaJerseyClient.java
@@ -26,7 +26,6 @@
26 26
 import org.slf4j.Logger;
27 27
 import org.slf4j.LoggerFactory;
28 28
 
29  
-import com.netflix.discovery.DiscoveryClient;
30 29
 import com.netflix.discovery.provider.DiscoveryJerseyProvider;
31 30
 import com.sun.jersey.api.client.config.ClientConfig;
32 31
 import com.sun.jersey.client.apache4.ApacheHttpClient4;
4  eureka-client/src/main/java/com/netflix/discovery/shared/LookupService.java
@@ -26,8 +26,9 @@
26 26
  * Lookup service for finding active instances.
27 27
  * 
28 28
  * @author Karthik Ranganathan, Greg Kim.
  29
+
29 30
  */
30  
-public interface LookupService<T> {
  31
+public interface LookupService {