Class JRTConfigRequester
- java.lang.Object
-
- com.yahoo.config.subscription.impl.JRTConfigRequester
-
- All Implemented Interfaces:
com.yahoo.jrt.RequestWaiter
public class JRTConfigRequester extends java.lang.Object implements com.yahoo.jrt.RequestWaiter
This class fetches config payload using JRT, and acts as the callback target. It uses theJRTConfigSubscription
andJRTClientConfigRequest
as context, and puts the request objects on a queue on the subscription, for handling by the user thread.- Author:
- Vegard Havdal
-
-
Field Summary
Fields Modifier and Type Field Description static ConfigSourceSet
defaultSourceSet
-
Constructor Summary
Constructors Constructor Description JRTConfigRequester(ConnectionPool connectionPool, TimingValues timingValues)
Only for testing
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
static JRTConfigRequester
create(ConfigSourceSet sourceSet, TimingValues timingValues)
ConnectionPool
getConnectionPool()
void
handleRequestDone(com.yahoo.jrt.Request req)
<T extends com.yahoo.config.ConfigInstance>
voidrequest(JRTConfigSubscription<T> sub)
Requests the config for theConfigInstance
on the givenConfigSubscription
-
-
-
Field Detail
-
defaultSourceSet
public static final ConfigSourceSet defaultSourceSet
-
-
Constructor Detail
-
JRTConfigRequester
public JRTConfigRequester(ConnectionPool connectionPool, TimingValues timingValues)
Only for testing
-
-
Method Detail
-
create
public static JRTConfigRequester create(ConfigSourceSet sourceSet, TimingValues timingValues)
-
request
public <T extends com.yahoo.config.ConfigInstance> void request(JRTConfigSubscription<T> sub)
Requests the config for theConfigInstance
on the givenConfigSubscription
- Parameters:
sub
- a subscription
-
handleRequestDone
public void handleRequestDone(com.yahoo.jrt.Request req)
- Specified by:
handleRequestDone
in interfacecom.yahoo.jrt.RequestWaiter
-
close
public void close()
-
getConnectionPool
public ConnectionPool getConnectionPool()
-
-