~ubuntu-branches/ubuntu/maverick/eucalyptus/maverick

« back to all changes in this revision

Viewing changes to clc/modules/cluster-manager/src/main/java/com/eucalyptus/cluster/Clusters.java

  • Committer: Bazaar Package Importer
  • Author(s): Dave Walker (Daviey)
  • Date: 2010-07-21 17:27:10 UTC
  • mfrom: (1.1.38 upstream)
  • Revision ID: james.westby@ubuntu.com-20100721172710-7xv07dmdqgivc3t9
Tags: 2.0~bzr1211-0ubuntu1
* New major upstream version merge, 2.0 (r1211).
* debian/patches/:
  - 01-wsdl-stubs.patch, debian/wsdl.md5sums: wsdl stubs updated.
  - 02-Makefile.patch: Updated to reflect new code layout.
  - 07-local_support_euca_conf-in.patch: Updated to reflect new code layout.
  - 08-ubuntu-default-networking.patch: Refreshed.
  - 09-small-128-192MB.patch: Updated to point to new location.
  - 10-disable-iscsi.patch: Refreshed.
  - 11-state-cleanup-memleakfix.patch: Removed, fixed upstream.
  - 15-fix-default-ramdisk.patch: Updated to point to new location.
  - 16-kvm_libvirt_xml_default_use_kvm.patch: Updated to reflect changes.
  - 17-fix_walrus_OOM_errors.patch: Removed, fixed upstream.
  - 18-priv_security.patch: Updated to reflect upstream changes.
  - 20-brute-force-webui.patch: Updated to reflect upstream changes. 
  - 21-eucalyptus-1.7-with-gwt-1.6.4.patch: New patch, allows 
    eucalyptus-1.7 to be built against gwt 1.6.4. Based on patch courtesy 
    of Dmitrii Zagorodnov, upstream. (LP: #597330)
* debian/eucalyptus-java-common.links: 
  - Changed symlink for groovy, point to groovy.all.jar, making compatiable 
    with groovy versions >1.7. (LP: #595421)
  - Added ant.jar & jetty-rewrite-handler.jar as they are now required.
* debian/control
  - & debian/build-jars: Added libjavassist-java and libjetty-extra-java as 
    build dependencies.
  - Added libjetty-extra-java as a dependency of eucalyptus-java-common
* The binary resulting jar's have been renamed from eucalyptus-*-1.6.2.jar
  to eucalyptus-*-main.jar:    
  - debian/eucalyptus-cc.upstart
  - debian/eucalyptus-cloud.install
  - debian/eucalyptus-common.eucalyptus.upstart
  - debian/eucalyptus-java-common.install
  - debian/eucalyptus-network.upstart
  - debian/eucalyptus-sc.install
  - debian/eucalyptus-walrus.install
* debian/eucalyptus-java-common.install: New upstream jars that have been
  installed:
  - eucalyptus-db-hsqldb-ext-main.jar
  - eucalyptus-component-main.jar
* debian/control:
  - Updated Standards Version to 3.8.4 (no change)
  - Updated the upstream Homepage to: http://open.eucalyptus.com/
  - Changed Vcs-Bzr to reflect new location of Ubuntu hosted development branch.
  - Made the Build Dependency of groovy and the binary eucalyptus-java-common
    package depend on version >=1.7.

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
 
66
66
import java.util.ArrayList;
67
67
import java.util.List;
68
 
import java.util.NoSuchElementException;
69
68
import java.util.SortedSet;
70
69
import java.util.TreeSet;
71
70
import org.apache.log4j.Logger;
73
72
import com.google.common.base.Predicate;
74
73
import com.google.common.collect.Iterables;
75
74
import com.google.common.collect.Lists;
76
 
import edu.ucsb.eucalyptus.cloud.cluster.QueuedEvent;
77
 
import edu.ucsb.eucalyptus.cloud.cluster.QueuedEventCallback;
78
 
import edu.ucsb.eucalyptus.msgs.EucalyptusMessage;
79
75
import edu.ucsb.eucalyptus.msgs.RegisterClusterType;
80
76
 
81
77
public class Clusters extends AbstractNamedRegistry<Cluster> {
111
107
      hostOrdered.add( c.getConfiguration( ).getHostName( ) );
112
108
    return Lists.newArrayList( hostOrdered );
113
109
  }
114
 
  
115
 
  @SuppressWarnings( "unchecked" )
116
 
  public static void sendClusterEvent( String clusterName, QueuedEvent event ) throws NoSuchElementException {
117
 
    Cluster cluster = Clusters.getInstance( ).lookup( clusterName );
118
 
    Clusters.sendClusterEvent( cluster, event );
119
 
  }
120
 
  
121
 
  @SuppressWarnings( "unchecked" )
122
 
  public static void sendClusterEvent( Cluster cluster, QueuedEvent event ) throws NoSuchElementException {
123
 
    event.getCallback( ).fire( cluster.getHostName( ), cluster.getPort( ), cluster.getServicePath( ), event.getEvent( ) );
124
 
  }
125
 
  
126
 
    @SuppressWarnings( "unchecked" )
127
 
    public static void dispatchClusterEvent( Cluster cluster, QueuedEventCallback callback, EucalyptusMessage msg ) throws NoSuchElementException {
128
 
      cluster.getMessageQueue( ).enqueue( QueuedEvent.make( callback, msg ) );
129
 
    }
130
 
  
131
 
    @SuppressWarnings( "unchecked" )
132
 
    public static void sendClusterEvent( Cluster cluster, QueuedEventCallback callback ) throws NoSuchElementException {
133
 
      Clusters.sendClusterEvent( cluster, QueuedEvent.make( callback, callback.getRequest( ) ) );
134
 
    }
135
 
  
136
 
    @SuppressWarnings( "unchecked" )
137
 
    public static void sendClusterEvent( String clusterName, QueuedEventCallback callback ) throws NoSuchElementException {
138
 
      Cluster cluster = Clusters.getInstance( ).lookup( clusterName );
139
 
      Clusters.sendClusterEvent( cluster, QueuedEvent.make( callback, callback.getRequest( ) ) );
140
 
    }
141
 
  
142
 
    @SuppressWarnings( "unchecked" )
143
 
    public static void dispatchClusterEvent( Cluster cluster, QueuedEventCallback callback ) throws NoSuchElementException {
144
 
      cluster.getMessageQueue( ).enqueue( QueuedEvent.make( callback, callback.getRequest( ) ) );
145
 
    }
146
 
  
147
 
    @SuppressWarnings( "unchecked" )
148
 
    public static void dispatchClusterEvent( String clusterName, QueuedEventCallback callback ) throws NoSuchElementException {
149
 
      Cluster cluster = Clusters.getInstance( ).lookup( clusterName );
150
 
      Clusters.dispatchClusterEvent( cluster, callback );
151
 
    }
152
 
  
153
 
    @SuppressWarnings( "unchecked" )
154
 
    public static void dispatchClusterEvent( String clusterName, QueuedEventCallback callback, EucalyptusMessage msg ) throws NoSuchElementException {
155
 
      Cluster cluster = Clusters.getInstance( ).lookup( clusterName );
156
 
      Clusters.dispatchClusterEvent( cluster, callback, msg );
157
 
    }
158
 
  
 
110
    
159
111
}