Permalink
Browse files

tweaks to host startup

  • Loading branch information...
1 parent 2a0f802 commit a4b50e43851ad8e627ffa9bdf9fb4aeb3acb8d77 grze@eucalyptus.com committed Nov 7, 2011
Showing with 206 additions and 214 deletions.
  1. +196 −197 clc/.classpath
  2. +1 −1 clc/.project
  3. +1 −1 clc/eucadmin/.project
  4. +6 −13 clc/modules/msgs/src/main/java/com/eucalyptus/bootstrap/Hosts.java
  5. +1 −1 devel/.project
  6. +1 −1 project/.project
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>eee_clc_dev:clc</name>
+ <name>grze_eee_clc_dev:clc</name>
<comment></comment>
<projects>
</projects>
View
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>eee_clc_dev:eucadmin</name>
+ <name>grze_eee_clc_dev:eucadmin</name>
<comment></comment>
<projects>
</projects>
@@ -702,7 +702,7 @@ public boolean apply( final Host arg0 ) {
}
- public enum Coordinator implements Predicate<Host>, Supplier<Host>, Function<Collection<Host>, Host> {
+ public enum Coordinator implements Predicate<Host> {
INSTANCE;
private final AtomicLong currentStartTime = new AtomicLong( Long.MAX_VALUE );
@@ -730,29 +730,22 @@ public Host createLocalHost( ) {
return new Host( Coordinator.INSTANCE.currentStartTime.get( ) );
}
- @Override
- public Host get( ) {
- return this.apply( Hosts.hostMap.values( ) );
- }
-
- @Override
public Host apply( final Collection<Host> input ) {
Host ret = null;
try {
ret = Iterables.find( input, this );
} catch ( final NoSuchElementException ex ) {
- ret = Hosts.localHost( );
}
LOG.debug( "Found coordinator: " + ret );
return ret;
}
public Boolean isLocalhost( ) {
- return this.apply( hostMap.values( ) ).isLocalHost( );
- }
-
- public boolean getCurrentCoordinator( ) {
- return this.isLocalhost( );
+ try {
+ return Iterables.find( hostMap.values( ), this ).isLocalHost( );
+ } catch ( final NoSuchElementException ex ) {
+ return false;
+ }
}
public long getCurrentStartTime( ) {
View
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>eee_clc_dev:devel</name>
+ <name>grze_eee_clc_dev:devel</name>
<comment></comment>
<projects>
</projects>
View
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>eee_clc_dev:c</name>
+ <name>grze_eee_clc_dev:c</name>
<comment></comment>
<projects>
</projects>

0 comments on commit a4b50e4

Please sign in to comment.