Class StoragePolicy
- java.lang.Object
-
- com.yahoo.documentapi.messagebus.protocol.SlobrokPolicy
-
- com.yahoo.documentapi.messagebus.protocol.StoragePolicy
-
- All Implemented Interfaces:
DocumentProtocolRoutingPolicy
,com.yahoo.messagebus.routing.RoutingPolicy
- Direct Known Subclasses:
ContentPolicy
public class StoragePolicy extends SlobrokPolicy
Routing policy to determine which distributor in a storage cluster to send data to. Using different key=value parameters separated by semicolon (";"), the user can control which cluster to send to. cluster=[clusterName] (Mandatory, determines the cluster name) config=[config] (Optional, a comma separated list of config servers to use. Used to talk to clusters not defined in this vespa application) slobrokconfigid=[id] (Optional, use given config id for slobrok instead of default) clusterconfigid=[id] (Optional, use given config id for distribution instead of default)- Author:
- Haakon Humberset
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StoragePolicy.BucketIdCalculator
Helper class to get the bucket identifier of a message.static class
StoragePolicy.DistributorSelectionLogic
Class handling the logic of picking a distributorstatic class
StoragePolicy.HostFetcher
Helper class to match a host pattern with node to use.static class
StoragePolicy.Parameters
Class parsing the semicolon separated parameter string and exposes the appropriate value to the policy.static class
StoragePolicy.SlobrokHostFetcher
Host fetcher using a slobrok mirror to find the hosts.static class
StoragePolicy.SlobrokHostPatternGenerator
This class merely generates slobrok a host pattern for a given distributor.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
owningBucketStates
-
Constructor Summary
Constructors Constructor Description StoragePolicy(StoragePolicy.Parameters p)
Constructor specifying a bit more in detail, so we can override what needs to be overridden in testsStoragePolicy(java.lang.String param)
Constructor used in production.StoragePolicy(java.util.Map<java.lang.String,java.lang.String> params)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
void
merge(com.yahoo.messagebus.routing.RoutingContext context)
void
select(com.yahoo.messagebus.routing.RoutingContext context)
-
Methods inherited from class com.yahoo.documentapi.messagebus.protocol.SlobrokPolicy
lookup, parse
-
-
-
-
Field Detail
-
owningBucketStates
public static final java.lang.String owningBucketStates
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StoragePolicy
public StoragePolicy(java.lang.String param)
Constructor used in production.
-
StoragePolicy
public StoragePolicy(java.util.Map<java.lang.String,java.lang.String> params)
-
StoragePolicy
public StoragePolicy(StoragePolicy.Parameters p)
Constructor specifying a bit more in detail, so we can override what needs to be overridden in tests
-
-