com.netflix.eureka
Class RemoteRegionRegistry

java.lang.Object
  extended by com.netflix.eureka.RemoteRegionRegistry
All Implemented Interfaces:
com.netflix.discovery.shared.LookupService<java.lang.String>

public class RemoteRegionRegistry
extends java.lang.Object
implements com.netflix.discovery.shared.LookupService<java.lang.String>

Handles all registry operations that needs to be done on a eureka service running in an other region. The primary operations include fetching registry information from remote region and fetching delta information on a periodic basis.


Constructor Summary
RemoteRegionRegistry(java.net.URL remoteRegionURL)
           
 
Method Summary
 com.netflix.discovery.shared.Application getApplication(java.lang.String appName)
           
 com.netflix.discovery.shared.Applications getApplicationDeltas()
           
 com.netflix.discovery.shared.Applications getApplications()
           
 java.util.List<com.netflix.appinfo.InstanceInfo> getInstancesById(java.lang.String id)
           
 com.netflix.appinfo.InstanceInfo getNextServerFromEureka(java.lang.String arg0, boolean arg1)
           
 boolean isReadyForServingData()
          Check if this registry is ready for serving data.
 com.sun.jersey.api.client.ClientResponse storeFullRegistry()
          Gets the full registry information from the eureka server and stores it locally.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteRegionRegistry

public RemoteRegionRegistry(java.net.URL remoteRegionURL)
Method Detail

isReadyForServingData

public boolean isReadyForServingData()
Check if this registry is ready for serving data.

Returns:
true if ready, false otherwise.

storeFullRegistry

public com.sun.jersey.api.client.ClientResponse storeFullRegistry()
Gets the full registry information from the eureka server and stores it locally.

Returns:
the full registry information.

getApplications

public com.netflix.discovery.shared.Applications getApplications()
Specified by:
getApplications in interface com.netflix.discovery.shared.LookupService<java.lang.String>

getNextServerFromEureka

public com.netflix.appinfo.InstanceInfo getNextServerFromEureka(java.lang.String arg0,
                                                                boolean arg1)
Specified by:
getNextServerFromEureka in interface com.netflix.discovery.shared.LookupService<java.lang.String>

getApplication

public com.netflix.discovery.shared.Application getApplication(java.lang.String appName)
Specified by:
getApplication in interface com.netflix.discovery.shared.LookupService<java.lang.String>

getInstancesById

public java.util.List<com.netflix.appinfo.InstanceInfo> getInstancesById(java.lang.String id)
Specified by:
getInstancesById in interface com.netflix.discovery.shared.LookupService<java.lang.String>

getApplicationDeltas

public com.netflix.discovery.shared.Applications getApplicationDeltas()