Class RawConfigSubscription<T extends com.yahoo.config.ConfigInstance>
- java.lang.Object
-
- com.yahoo.config.subscription.impl.ConfigSubscription<T>
-
- com.yahoo.config.subscription.impl.RawConfigSubscription<T>
-
public class RawConfigSubscription<T extends com.yahoo.config.ConfigInstance> extends ConfigSubscription<T>
Subscription used when config id is raw:...Config is the actual text given after the config id, with newlines
- Author:
- Vegard Havdal
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.yahoo.config.subscription.impl.ConfigSubscription
ConfigSubscription.ConfigState<T extends com.yahoo.config.ConfigInstance>
-
-
Field Summary
-
Fields inherited from class com.yahoo.config.subscription.impl.ConfigSubscription
configClass, key, log
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
nextConfig(long timeout)
Polls this subscription for a change.boolean
subscribe(long timeout)
Will block until the nextConfigSubscription.nextConfig(long)
is guaranteed to return an answer (or throw) immediately (i.e.-
Methods inherited from class com.yahoo.config.subscription.impl.ConfigSubscription
checkReloaded, close, equals, get, getConfigClass, getConfigState, getDefContent, getException, getKey, isClosed, isConfigChangedAndReset, reload, setConfigIfChanged, setConfigIncGen, setException, toString
-
-
-
-
Method Detail
-
nextConfig
public boolean nextConfig(long timeout)
Description copied from class:ConfigSubscription
Polls this subscription for a change. The method is guaranteed to use all of the given timeout before returning false. It will also take into account a user-set generation, that can be set byConfigSubscriber.reload(long)
.- Specified by:
nextConfig
in classConfigSubscription<T extends com.yahoo.config.ConfigInstance>
- Parameters:
timeout
- in milliseconds- Returns:
- false if timed out, true if generation or config or
ConfigSubscription.exception
changed. If true, theConfigSubscription.config
field will be set also. has changed
-
subscribe
public boolean subscribe(long timeout)
Description copied from class:ConfigSubscription
Will block until the nextConfigSubscription.nextConfig(long)
is guaranteed to return an answer (or throw) immediately (i.e. not block)- Specified by:
subscribe
in classConfigSubscription<T extends com.yahoo.config.ConfigInstance>
- Parameters:
timeout
- in milliseconds- Returns:
- false if timed out
-
-