Package org.apache.hedwig.protocol.PubSubProtocol

Examples of org.apache.hedwig.protocol.PubSubProtocol.SubscriptionPreferences


            byte[] prefsData = value.getField(SUB_PREFS_FIELD);
            if (null != prefsData) {
                SubscriptionPreferences.Builder preferencesBuilder = SubscriptionPreferences.newBuilder();
                TextFormat.merge(new String(prefsData, UTF8), preferencesBuilder);
                SubscriptionPreferences preferences = preferencesBuilder.build();
                builder.setPreferences(preferences);
            }

            return builder.build();
        }
View Full Code Here


        ByteString subscriber = ByteString.copyFromUtf8("subRaceSubscriber");

        PersistenceManager pm = new StubPersistenceManager();
        FIFODeliveryManager fdm = new FIFODeliveryManager(pm, conf);
        ExecutorDeliveryEndPointWithQueue dep = new ExecutorDeliveryEndPointWithQueue();
        SubscriptionPreferences prefs = SubscriptionPreferences.newBuilder().build();

        PipelineFilter filter = new PipelineFilter();
        filter.addLast(new AllToAllTopologyFilter());
        filter.initialize(conf.getConf());
        filter.setSubscriptionPreferences(topic, subscriber, prefs);
View Full Code Here

        ByteString subscriber = ByteString.copyFromUtf8("throttlingRaceSubscriber");

        PersistenceManager pm = new StubPersistenceManager();
        FIFODeliveryManager fdm = new FIFODeliveryManager(pm, conf);
        ExecutorDeliveryEndPoint dep = new ExecutorDeliveryEndPoint(fdm);
        SubscriptionPreferences prefs = SubscriptionPreferences.newBuilder().build();

        PipelineFilter filter = new PipelineFilter();
        filter.addLast(new AllToAllTopologyFilter());
        filter.initialize(conf.getConf());
        filter.setSubscriptionPreferences(topic, subscriber, prefs);
View Full Code Here

        }
        switch (response.getStatusCode()) {
        case SUCCESS:
            TopicSubscriber ts = new TopicSubscriber(pubSubData.topic,
                                                     pubSubData.subscriberId);
            SubscriptionPreferences preferences = null;
            if (response.hasResponseBody()) {
                ResponseBody respBody = response.getResponseBody();
                if (respBody.hasSubscribeResponse()) {
                    SubscribeResponse resp = respBody.getSubscribeResponse();
                    if (resp.hasPreferences()) {
View Full Code Here

TOP

Related Classes of org.apache.hedwig.protocol.PubSubProtocol.SubscriptionPreferences

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.