Package org.apache.stratos.manager.publisher

Examples of org.apache.stratos.manager.publisher.InstanceNotificationPublisher


                for (CartridgeSubscription cartridgeSubscription : cartridgeSubscriptions) {
                    // We need to send this event for all types, single tenant and multi tenant.
                    // In an autoscaling scenario, we need to send this event for all existing subscriptions for the newly spawned instance
                    // Also in a case of restarting the agent, this event needs to be sent for all subscriptions for the existing instance
                    if (cartridgeSubscription.getRepository() != null) {
                        InstanceNotificationPublisher publisher = new InstanceNotificationPublisher();
                        publisher.sendArtifactUpdateEvent(cartridgeSubscription.getRepository(), clusterId,
                                String.valueOf(cartridgeSubscription.getSubscriber().getTenantId()));

                    } else {
                        if(log.isDebugEnabled()) {
                            log.debug("No repository found for subscription with alias: " + cartridgeSubscription.getAlias() + ", type: " + cartridgeSubscription.getType()+
View Full Code Here


        if (repository != null) {

            // publish the ArtifactUpdated event
            log.info(" Multitenant --> Publishing Artifact update event -- ");
            log.info(" Values :  cluster id - " + cluster.getClusterDomain() + "  tenant - " + subscriber.getTenantId());
            InstanceNotificationPublisher publisher = new InstanceNotificationPublisher();
            publisher.sendArtifactUpdateEvent(repository, cluster.getClusterDomain(), String.valueOf(subscriber.getTenantId()));

        } else {
            if(log.isDebugEnabled()) {
                log.debug("No repository found for subscription with alias: " + alias + ", type: " + cartridgeInfo.getType() +
                        ". Not sending the Artifact Updated event");
View Full Code Here

        }
    }
   
  public void updateRepository(CartridgeSubscription cartridgeSubscription) {
    if (cartridgeSubscription.getRepository() != null) {
      InstanceNotificationPublisher publisher = new InstanceNotificationPublisher();
      publisher.sendArtifactUpdateEvent(cartridgeSubscription.getRepository(),
          String.valueOf(cartridgeSubscription.getCluster().getId()),
          String.valueOf(cartridgeSubscription.getSubscriber().getTenantId()));

      if (log.isDebugEnabled()) {
        log.debug("Git pull request from " + cartridgeSubscription.getRepository()
View Full Code Here

public class InstanceCleanupNotificationService extends AbstractAdmin {
    private static final Log log = LogFactory.getLog(InstanceCleanupNotificationService.class);

    public void sendInstanceCleanupNotificationForMember(String memberId) {
        //sending the notification event to the instance
        new InstanceNotificationPublisher().sendInstanceCleanupEventForMember(memberId);
    }
View Full Code Here

        new InstanceNotificationPublisher().sendInstanceCleanupEventForMember(memberId);
    }

    public void sendInstanceCleanupNotificationForCluster(String clusterId) {
        //sending the notification event to the cluster
        new InstanceNotificationPublisher().sendInstanceCleanupEventForCluster(clusterId);
    }
View Full Code Here

TOP

Related Classes of org.apache.stratos.manager.publisher.InstanceNotificationPublisher

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.