diff options
-rw-r--r-- | plugins/org.eclipse.osee.cluster.admin.hazelcast/OSGI-INF/cluster.admin.impl.xml | 16 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.admin.rest/OSGI-INF/cluster.admin.application.xml | 9 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.admin/META-INF/MANIFEST.MF | 8 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.hazelcast/.classpath (renamed from plugins/org.eclipse.osee.cluster.admin.hazelcast/.classpath) | 0 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.hazelcast/.project (renamed from plugins/org.eclipse.osee.cluster.admin.rest/.project) | 2 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.hazelcast/META-INF/MANIFEST.MF (renamed from plugins/org.eclipse.osee.cluster.admin.hazelcast/META-INF/MANIFEST.MF) | 11 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.hazelcast/OSGI-INF/cluster.service.impl.xml | 19 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.hazelcast/build.properties (renamed from plugins/org.eclipse.osee.cluster.admin.hazelcast/build.properties) | 0 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/AtomicNumberProxy.java (renamed from plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/AtomicNumberProxy.java) | 12 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/CallableTransactionImpl.java (renamed from plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/CallableTransactionImpl.java) | 6 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/ClusterEventNotifier.java (renamed from plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/ClusterEventNotifier.java) | 45 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/ClusterProxy.java (renamed from plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/ClusterProxy.java) | 6 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/ClusterServiceImpl.java (renamed from plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/ClusterAdminImpl.java) | 60 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedBlockingQueueProxy.java (renamed from plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedBlockingQueueProxy.java) | 2 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedExecutorServiceImpl.java (renamed from plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedExecutorServiceImpl.java) | 8 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedIdProxy.java (renamed from plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedIdProxy.java) | 2 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedListProxy.java (renamed from plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedListProxy.java) | 2 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedLockProxy.java (renamed from plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedLockProxy.java) | 2 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedMapProxy.java (renamed from plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedMapProxy.java) | 2 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedMultiMapProxy.java (renamed from plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedMultiMapProxy.java) | 2 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedSetProxy.java (renamed from plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedSetProxy.java) | 2 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/MemberProxy.java (renamed from plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/MemberProxy.java) | 4 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/TransactionProxy.java (renamed from plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/TransactionProxy.java) | 4 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.rest/.classpath (renamed from plugins/org.eclipse.osee.cluster.admin.rest/.classpath) | 0 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.rest/.project (renamed from plugins/org.eclipse.osee.cluster.admin.hazelcast/.project) | 2 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.rest/META-INF/MANIFEST.MF (renamed from plugins/org.eclipse.osee.cluster.admin.rest/META-INF/MANIFEST.MF) | 6 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.rest/OSGI-INF/cluster.rest.application.xml | 9 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.rest/build.properties (renamed from plugins/org.eclipse.osee.cluster.admin.rest/build.properties) | 2 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/ClusterRestApplication.java (renamed from plugins/org.eclipse.osee.cluster.admin.rest/src/org/eclipse/osee/cluster/admin/rest/internal/ClusterAdminApplication.java) | 22 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/ClusterUtil.java (renamed from plugins/org.eclipse.osee.cluster.admin.rest/src/org/eclipse/osee/cluster/admin/rest/internal/ClusterUtil.java) | 4 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/JobsResource.java (renamed from plugins/org.eclipse.osee.cluster.admin.rest/src/org/eclipse/osee/cluster/admin/rest/internal/JobsResource.java) | 2 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/MemberResource.java (renamed from plugins/org.eclipse.osee.cluster.admin.rest/src/org/eclipse/osee/cluster/admin/rest/internal/MemberResource.java) | 8 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/MembersResource.java (renamed from plugins/org.eclipse.osee.cluster.admin.rest/src/org/eclipse/osee/cluster/admin/rest/internal/MembersResource.java) | 10 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/XmlMember.java (renamed from plugins/org.eclipse.osee.cluster.admin.rest/src/org/eclipse/osee/cluster/admin/rest/internal/XmlMember.java) | 2 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster/.classpath (renamed from plugins/org.eclipse.osee.cluster.admin/.classpath) | 0 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster/.project (renamed from plugins/org.eclipse.osee.cluster.admin/.project) | 2 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster/META-INF/MANIFEST.MF | 8 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster/build.properties (renamed from plugins/org.eclipse.osee.cluster.admin/build.properties) | 0 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/Callback.java (renamed from plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/Callback.java) | 2 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/Cluster.java (renamed from plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/Cluster.java) | 2 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/ClusterConstants.java (renamed from plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/ClusterAdminConstants.java) | 4 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/ClusterService.java (renamed from plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/ClusterAdmin.java) | 4 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/ClusterServiceUtils.java (renamed from plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/ClusterServiceUtils.java) | 4 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/DistributedExecutorService.java (renamed from plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/DistributedExecutorService.java) | 2 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/Member.java (renamed from plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/Member.java) | 2 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/Transaction.java (renamed from plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/Transaction.java) | 2 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/TransactionWork.java (renamed from plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/TransactionWork.java) | 2 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.distributed/src/org/eclipse/osee/distributed/AtomicNumber.java | 4 |
48 files changed, 158 insertions, 171 deletions
diff --git a/plugins/org.eclipse.osee.cluster.admin.hazelcast/OSGI-INF/cluster.admin.impl.xml b/plugins/org.eclipse.osee.cluster.admin.hazelcast/OSGI-INF/cluster.admin.impl.xml deleted file mode 100644 index 1f41505d38c..00000000000 --- a/plugins/org.eclipse.osee.cluster.admin.hazelcast/OSGI-INF/cluster.admin.impl.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="start" deactivate="stop" immediate="true" name="org.eclipse.osee.cluster.admin.hazelcast.internal.ClusterAdminImpl"> - <implementation class="org.eclipse.osee.cluster.admin.hazelcast.internal.ClusterAdminImpl"/> - <reference interface="org.osgi.service.event.EventAdmin" name="EventAdmin" - cardinality="1..1" - policy="static" - bind="setEventAdmin" /> - <reference interface="org.eclipse.osee.logger.Log" name="Log" - cardinality="1..1" - policy="static" - bind="setLogger" /> - <service> - <provide interface="org.eclipse.osee.cluster.admin.ClusterAdmin"/> - <provide interface="org.eclipse.osee.distributed.InstanceManager"/> - </service> -</scr:component> diff --git a/plugins/org.eclipse.osee.cluster.admin.rest/OSGI-INF/cluster.admin.application.xml b/plugins/org.eclipse.osee.cluster.admin.rest/OSGI-INF/cluster.admin.application.xml deleted file mode 100644 index bd67abfd3c1..00000000000 --- a/plugins/org.eclipse.osee.cluster.admin.rest/OSGI-INF/cluster.admin.application.xml +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osee.cluster.admin.rest.internal.ClusterAdminApplication"> - <implementation class="org.eclipse.osee.cluster.admin.rest.internal.ClusterAdminApplication"/> - <service> - <provide interface="javax.ws.rs.core.Application"/> - </service> - <property name="context.name" type="String" value="clusterAdmin"/> - <reference bind="setClusterAdmin" cardinality="1..1" interface="org.eclipse.osee.cluster.admin.ClusterAdmin" name="ClusterAdmin" policy="static"/> -</scr:component>
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.cluster.admin/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.cluster.admin/META-INF/MANIFEST.MF deleted file mode 100644 index 96e410d5bae..00000000000 --- a/plugins/org.eclipse.osee.cluster.admin/META-INF/MANIFEST.MF +++ /dev/null @@ -1,8 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Culster Admin -Bundle-SymbolicName: org.eclipse.osee.cluster.admin -Bundle-Version: 1.0.0.qualifier -Bundle-Vendor: OSEE -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Export-Package: org.eclipse.osee.cluster.admin diff --git a/plugins/org.eclipse.osee.cluster.admin.hazelcast/.classpath b/plugins/org.eclipse.osee.cluster.hazelcast/.classpath index ad32c83a788..ad32c83a788 100644 --- a/plugins/org.eclipse.osee.cluster.admin.hazelcast/.classpath +++ b/plugins/org.eclipse.osee.cluster.hazelcast/.classpath diff --git a/plugins/org.eclipse.osee.cluster.admin.rest/.project b/plugins/org.eclipse.osee.cluster.hazelcast/.project index d160a993d51..d158a887d89 100644 --- a/plugins/org.eclipse.osee.cluster.admin.rest/.project +++ b/plugins/org.eclipse.osee.cluster.hazelcast/.project @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <projectDescription> - <name>org.eclipse.osee.cluster.admin.rest</name> + <name>org.eclipse.osee.cluster.hazelcast</name> <comment></comment> <projects> </projects> diff --git a/plugins/org.eclipse.osee.cluster.admin.hazelcast/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.cluster.hazelcast/META-INF/MANIFEST.MF index 2778f4b2038..14a1d38bd02 100644 --- a/plugins/org.eclipse.osee.cluster.admin.hazelcast/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.osee.cluster.hazelcast/META-INF/MANIFEST.MF @@ -1,15 +1,16 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: OSEE Hazelcast Cluster -Bundle-SymbolicName: org.eclipse.osee.cluster.admin.hazelcast -Bundle-Version: 1.0.0.qualifier +Bundle-SymbolicName: org.eclipse.osee.cluster.hazelcast +Bundle-Version: 0.9.9.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Import-Package: com.hazelcast.config, com.hazelcast.core, com.hazelcast.impl, com.hazelcast.query, - org.eclipse.osee.cluster.admin, + org.eclipse.osee.cluster, org.eclipse.osee.distributed, - org.eclipse.osee.logger, - org.osgi.service.event + org.eclipse.osee.event, + org.eclipse.osee.logger Service-Component: OSGI-INF/*.xml +Bundle-Vendor: Eclipse Open System Engineering Environment diff --git a/plugins/org.eclipse.osee.cluster.hazelcast/OSGI-INF/cluster.service.impl.xml b/plugins/org.eclipse.osee.cluster.hazelcast/OSGI-INF/cluster.service.impl.xml new file mode 100644 index 00000000000..a84e9a6af4e --- /dev/null +++ b/plugins/org.eclipse.osee.cluster.hazelcast/OSGI-INF/cluster.service.impl.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="start" deactivate="stop" enabled="true" name="org.eclipse.osee.cluster.hazelcast.internal.ClusterServiceImpl"> + <implementation class="org.eclipse.osee.cluster.hazelcast.internal.ClusterServiceImpl"/> + + <reference interface="org.eclipse.osee.event.EventService" name="EventService" + cardinality="1..1" + policy="static" + bind="setEventService" /> + + <reference interface="org.eclipse.osee.logger.Log" name="Log" + cardinality="1..1" + policy="static" + bind="setLogger" /> + + <service> + <provide interface="org.eclipse.osee.cluster.ClusterService"/> + <provide interface="org.eclipse.osee.distributed.InstanceManager"/> + </service> +</scr:component> diff --git a/plugins/org.eclipse.osee.cluster.admin.hazelcast/build.properties b/plugins/org.eclipse.osee.cluster.hazelcast/build.properties index c58ea2178c3..c58ea2178c3 100644 --- a/plugins/org.eclipse.osee.cluster.admin.hazelcast/build.properties +++ b/plugins/org.eclipse.osee.cluster.hazelcast/build.properties diff --git a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/AtomicNumberProxy.java b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/AtomicNumberProxy.java index a9c154808f4..15dd070da94 100644 --- a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/AtomicNumberProxy.java +++ b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/AtomicNumberProxy.java @@ -8,7 +8,7 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin.hazelcast.internal; +package org.eclipse.osee.cluster.hazelcast.internal; import org.eclipse.osee.distributed.AtomicNumber; @@ -75,18 +75,8 @@ public class AtomicNumberProxy implements AtomicNumber { } @Override - public void lazySet(long newValue) { - proxyObject.lazySet(newValue); - } - - @Override public boolean compareAndSet(long expect, long update) { return proxyObject.compareAndSet(expect, update); } - @Override - public boolean weakCompareAndSet(long expect, long update) { - return proxyObject.weakCompareAndSet(expect, update); - } - } diff --git a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/CallableTransactionImpl.java b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/CallableTransactionImpl.java index 35ccf4407da..399321bc420 100644 --- a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/CallableTransactionImpl.java +++ b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/CallableTransactionImpl.java @@ -8,11 +8,11 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin.hazelcast.internal; +package org.eclipse.osee.cluster.hazelcast.internal; import java.util.concurrent.Callable; -import org.eclipse.osee.cluster.admin.Transaction; -import org.eclipse.osee.cluster.admin.TransactionWork; +import org.eclipse.osee.cluster.Transaction; +import org.eclipse.osee.cluster.TransactionWork; import org.eclipse.osee.logger.Log; /** diff --git a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/ClusterEventNotifier.java b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/ClusterEventNotifier.java index e067246d26f..5bace119587 100644 --- a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/ClusterEventNotifier.java +++ b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/ClusterEventNotifier.java @@ -8,15 +8,14 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin.hazelcast.internal; +package org.eclipse.osee.cluster.hazelcast.internal; import java.util.Map; -import org.eclipse.osee.cluster.admin.ClusterAdminConstants; -import org.eclipse.osee.cluster.admin.ClusterAdminConstants.ClusterInstanceState; -import org.eclipse.osee.cluster.admin.ClusterServiceUtils; -import org.eclipse.osee.cluster.admin.Member; -import org.osgi.service.event.Event; -import org.osgi.service.event.EventAdmin; +import org.eclipse.osee.cluster.ClusterConstants; +import org.eclipse.osee.cluster.ClusterServiceUtils; +import org.eclipse.osee.cluster.Member; +import org.eclipse.osee.cluster.ClusterConstants.ClusterInstanceState; +import org.eclipse.osee.event.EventService; import com.hazelcast.core.Instance; import com.hazelcast.core.Instance.InstanceType; import com.hazelcast.core.InstanceEvent; @@ -34,64 +33,64 @@ public class ClusterEventNotifier implements LifecycleListener, InstanceListener private final String componentName; private final String contextName; - private final EventAdmin eventAdmin; + private final EventService eventService; - public ClusterEventNotifier(String componentName, String contextName, EventAdmin eventAdmin) { + public ClusterEventNotifier(String componentName, String contextName, EventService eventService) { this.componentName = componentName; this.contextName = contextName; - this.eventAdmin = eventAdmin; + this.eventService = eventService; } @Override public void memberAdded(MembershipEvent event) { Map<String, Object> data = toMap(event); - postEvent(ClusterAdminConstants.CLUSTER_MEMBER_ADDED_EVENT, data); + postEvent(ClusterConstants.CLUSTER_MEMBER_ADDED_EVENT, data); } @Override public void memberRemoved(MembershipEvent event) { Map<String, Object> data = toMap(event); - postEvent(ClusterAdminConstants.CLUSTER_MEMBER_REMOVED_EVENT, data); + postEvent(ClusterConstants.CLUSTER_MEMBER_REMOVED_EVENT, data); } @Override public void stateChanged(LifecycleEvent event) { Map<String, Object> data = ClusterServiceUtils.toMap(componentName, contextName); ClusterInstanceState state = mapState(event.getState()); - data.put(ClusterAdminConstants.CLUSTER_LIFECYCLE_STATE, state); - postEvent(ClusterAdminConstants.CLUSTER_LIFECYCLE_EVENT, data); + data.put(ClusterConstants.CLUSTER_LIFECYCLE_STATE, state); + postEvent(ClusterConstants.CLUSTER_LIFECYCLE_EVENT, data); } @Override public void instanceCreated(InstanceEvent event) { Map<String, Object> data = toMap(event); - postEvent(ClusterAdminConstants.CLUSTER_INSTANCE_CREATED_EVENT, data); + postEvent(ClusterConstants.CLUSTER_INSTANCE_CREATED_EVENT, data); } @Override public void instanceDestroyed(InstanceEvent event) { Map<String, Object> data = toMap(event); - postEvent(ClusterAdminConstants.CLUSTER_INSTANCE_DESTROYED_EVENT, data); + postEvent(ClusterConstants.CLUSTER_INSTANCE_DESTROYED_EVENT, data); } public void notifyRegistration() { Map<String, Object> data = ClusterServiceUtils.toMap(componentName, contextName); - postEvent(ClusterAdminConstants.CLUSTER_REGISTRATION_EVENT, data); + postEvent(ClusterConstants.CLUSTER_REGISTRATION_EVENT, data); } public void notifyDeRegistration() { Map<String, Object> data = ClusterServiceUtils.toMap(componentName, contextName); - postEvent(ClusterAdminConstants.CLUSTER_DEREGISTRATION_EVENT, data); + postEvent(ClusterConstants.CLUSTER_DEREGISTRATION_EVENT, data); } private void postEvent(String topic, Map<String, Object> data) { - eventAdmin.postEvent(new Event(topic, data)); + eventService.postEvent(topic, data); } private Map<String, Object> toMap(MembershipEvent membershipEvent) { Map<String, Object> data = ClusterServiceUtils.toMap(componentName, contextName); Member member = new MemberProxy(membershipEvent.getMember()); - data.put(ClusterAdminConstants.CLUSTER_MEMBER, member); + data.put(ClusterConstants.CLUSTER_MEMBER, member); return data; } @@ -101,9 +100,9 @@ public class ClusterEventNotifier implements LifecycleListener, InstanceListener Instance instance = event.getInstance(); Object objectId = instance.getId(); - data.put(ClusterAdminConstants.CLUSTER_OBJECT_TYPE, instanceType.name()); - data.put(ClusterAdminConstants.CLUSTER_OBJECT_ID, objectId); - data.put(ClusterAdminConstants.CLUSTER_OBJECT, instance); + data.put(ClusterConstants.CLUSTER_OBJECT_TYPE, instanceType.name()); + data.put(ClusterConstants.CLUSTER_OBJECT_ID, objectId); + data.put(ClusterConstants.CLUSTER_OBJECT, instance); return data; } diff --git a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/ClusterProxy.java b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/ClusterProxy.java index d872e83e13d..e3c634d5563 100644 --- a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/ClusterProxy.java +++ b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/ClusterProxy.java @@ -8,12 +8,12 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin.hazelcast.internal; +package org.eclipse.osee.cluster.hazelcast.internal; import java.util.HashSet; import java.util.Set; -import org.eclipse.osee.cluster.admin.Cluster; -import org.eclipse.osee.cluster.admin.Member; +import org.eclipse.osee.cluster.Cluster; +import org.eclipse.osee.cluster.Member; import com.hazelcast.core.HazelcastInstance; /** diff --git a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/ClusterAdminImpl.java b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/ClusterServiceImpl.java index dc8fca1860f..f31bd76d49e 100644 --- a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/ClusterAdminImpl.java +++ b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/ClusterServiceImpl.java @@ -8,7 +8,7 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin.hazelcast.internal; +package org.eclipse.osee.cluster.hazelcast.internal; import java.io.IOException; import java.lang.reflect.Constructor; @@ -19,12 +19,12 @@ import java.util.Set; import java.util.concurrent.BlockingQueue; import java.util.concurrent.Callable; import java.util.concurrent.ConcurrentHashMap; -import org.eclipse.osee.cluster.admin.Cluster; -import org.eclipse.osee.cluster.admin.ClusterAdmin; -import org.eclipse.osee.cluster.admin.ClusterServiceUtils; -import org.eclipse.osee.cluster.admin.DistributedExecutorService; -import org.eclipse.osee.cluster.admin.Transaction; -import org.eclipse.osee.cluster.admin.TransactionWork; +import org.eclipse.osee.cluster.Cluster; +import org.eclipse.osee.cluster.ClusterService; +import org.eclipse.osee.cluster.ClusterServiceUtils; +import org.eclipse.osee.cluster.DistributedExecutorService; +import org.eclipse.osee.cluster.Transaction; +import org.eclipse.osee.cluster.TransactionWork; import org.eclipse.osee.distributed.AtomicNumber; import org.eclipse.osee.distributed.DistributedId; import org.eclipse.osee.distributed.DistributedLock; @@ -32,8 +32,8 @@ import org.eclipse.osee.distributed.DistributedMap; import org.eclipse.osee.distributed.DistributedMultiMap; import org.eclipse.osee.distributed.DistributedObject; import org.eclipse.osee.distributed.InstanceManager; +import org.eclipse.osee.event.EventService; import org.eclipse.osee.logger.Log; -import org.osgi.service.event.EventAdmin; import com.hazelcast.config.Config; import com.hazelcast.config.UrlXmlConfig; import com.hazelcast.config.XmlConfigBuilder; @@ -55,24 +55,24 @@ import com.hazelcast.impl.GroupProperties; /** * @author Roberto E. Escobar */ -public class ClusterAdminImpl implements ClusterAdmin, InstanceManager { +public class ClusterServiceImpl implements ClusterService, InstanceManager { private final Map<Object, DistributedObject> distributedObjects = new ConcurrentHashMap<Object, DistributedObject>(); private final ProxyCleaner proxyCleaner = new ProxyCleaner(); private Log logger; - private EventAdmin eventAdmin; + private EventService eventService; private HazelcastInstance instance; private Thread thread; private ClusterEventNotifier eventNotifier; private ClusterProxy clusterProxy; private DistributedExecutorService executor; - public void setEventAdmin(EventAdmin eventAdmin) { - this.eventAdmin = eventAdmin; + public void setEventService(EventService eventService) { + this.eventService = eventService; } - private EventAdmin getEventAdmin() { - return eventAdmin; + private EventService getEventService() { + return eventService; } public void setLogger(Log logger) { @@ -129,22 +129,22 @@ public class ClusterAdminImpl implements ClusterAdmin, InstanceManager { } public synchronized void start(final Map<String, Object> properties) { - thread = new Thread("Register Pending Rest Services") { - @Override - public void run() { - Config config = getConfiguration(properties); - instance = Hazelcast.init(config); - clusterProxy = new ClusterProxy(instance); - executor = new DistributedExecutorServiceImpl(instance); - - String componentName = ClusterServiceUtils.getComponentName(properties); - String contextName = ClusterServiceUtils.getContextName(properties); - eventNotifier = new ClusterEventNotifier(componentName, contextName, getEventAdmin()); - registerEventListeners(); - eventNotifier.notifyRegistration(); - } - }; - thread.start(); + // thread = new Thread("Register Pending Rest Services") { + // @Override + // public void run() { + Config config = getConfiguration(properties); + instance = Hazelcast.init(config); + clusterProxy = new ClusterProxy(instance); + executor = new DistributedExecutorServiceImpl(instance); + + String componentName = ClusterServiceUtils.getComponentName(properties); + String contextName = ClusterServiceUtils.getContextName(properties); + eventNotifier = new ClusterEventNotifier(componentName, contextName, getEventService()); + registerEventListeners(); + eventNotifier.notifyRegistration(); + // } + // }; + // thread.start(); } public synchronized void stop(Map<String, Object> properties) { diff --git a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedBlockingQueueProxy.java b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedBlockingQueueProxy.java index 5243c0d6adb..4ee897dda5c 100644 --- a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedBlockingQueueProxy.java +++ b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedBlockingQueueProxy.java @@ -8,7 +8,7 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin.hazelcast.internal; +package org.eclipse.osee.cluster.hazelcast.internal; import java.util.Collection; import java.util.Iterator; diff --git a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedExecutorServiceImpl.java b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedExecutorServiceImpl.java index 72b7c69e454..bf007943349 100644 --- a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedExecutorServiceImpl.java +++ b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedExecutorServiceImpl.java @@ -8,7 +8,7 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin.hazelcast.internal; +package org.eclipse.osee.cluster.hazelcast.internal; import java.util.Collection; import java.util.HashSet; @@ -20,9 +20,9 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import org.eclipse.osee.cluster.admin.Callback; -import org.eclipse.osee.cluster.admin.DistributedExecutorService; -import org.eclipse.osee.cluster.admin.Member; +import org.eclipse.osee.cluster.Callback; +import org.eclipse.osee.cluster.DistributedExecutorService; +import org.eclipse.osee.cluster.Member; import com.hazelcast.core.DistributedTask; import com.hazelcast.core.ExecutionCallback; import com.hazelcast.core.HazelcastInstance; diff --git a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedIdProxy.java b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedIdProxy.java index 6ae5a935b1b..88066ed51d7 100644 --- a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedIdProxy.java +++ b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedIdProxy.java @@ -8,7 +8,7 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin.hazelcast.internal; +package org.eclipse.osee.cluster.hazelcast.internal; import org.eclipse.osee.distributed.DistributedId; diff --git a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedListProxy.java b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedListProxy.java index 01c415f01d7..d67ad37eac5 100644 --- a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedListProxy.java +++ b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedListProxy.java @@ -8,7 +8,7 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin.hazelcast.internal; +package org.eclipse.osee.cluster.hazelcast.internal; import java.util.Collection; import java.util.Iterator; diff --git a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedLockProxy.java b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedLockProxy.java index 44e8a717562..1150e5c6325 100644 --- a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedLockProxy.java +++ b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedLockProxy.java @@ -8,7 +8,7 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin.hazelcast.internal; +package org.eclipse.osee.cluster.hazelcast.internal; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Condition; diff --git a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedMapProxy.java b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedMapProxy.java index d0aba657730..3a27c6001b3 100644 --- a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedMapProxy.java +++ b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedMapProxy.java @@ -8,7 +8,7 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin.hazelcast.internal; +package org.eclipse.osee.cluster.hazelcast.internal; import java.util.Collection; import java.util.Map; diff --git a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedMultiMapProxy.java b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedMultiMapProxy.java index 1e52438b6fd..0543815052b 100644 --- a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedMultiMapProxy.java +++ b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedMultiMapProxy.java @@ -8,7 +8,7 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin.hazelcast.internal; +package org.eclipse.osee.cluster.hazelcast.internal; import java.util.Collection; import java.util.Map.Entry; diff --git a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedSetProxy.java b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedSetProxy.java index 3f506c5d321..5f2f6ffb3b3 100644 --- a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/DistributedSetProxy.java +++ b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedSetProxy.java @@ -8,7 +8,7 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin.hazelcast.internal; +package org.eclipse.osee.cluster.hazelcast.internal; import java.util.Collection; import java.util.Iterator; diff --git a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/MemberProxy.java b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/MemberProxy.java index cd7cc8319be..0782ec8f94e 100644 --- a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/MemberProxy.java +++ b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/MemberProxy.java @@ -8,10 +8,10 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin.hazelcast.internal; +package org.eclipse.osee.cluster.hazelcast.internal; import java.net.InetSocketAddress; -import org.eclipse.osee.cluster.admin.Member; +import org.eclipse.osee.cluster.Member; /** * @author Roberto E. Escobar diff --git a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/TransactionProxy.java b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/TransactionProxy.java index 77bd008b236..77e096044d8 100644 --- a/plugins/org.eclipse.osee.cluster.admin.hazelcast/src/org/eclipse/osee/cluster/admin/hazelcast/internal/TransactionProxy.java +++ b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/TransactionProxy.java @@ -8,9 +8,9 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin.hazelcast.internal; +package org.eclipse.osee.cluster.hazelcast.internal; -import org.eclipse.osee.cluster.admin.Transaction; +import org.eclipse.osee.cluster.Transaction; /** * @author Roberto E. Escobar diff --git a/plugins/org.eclipse.osee.cluster.admin.rest/.classpath b/plugins/org.eclipse.osee.cluster.rest/.classpath index ad32c83a788..ad32c83a788 100644 --- a/plugins/org.eclipse.osee.cluster.admin.rest/.classpath +++ b/plugins/org.eclipse.osee.cluster.rest/.classpath diff --git a/plugins/org.eclipse.osee.cluster.admin.hazelcast/.project b/plugins/org.eclipse.osee.cluster.rest/.project index ef0ac62809c..f5184787b84 100644 --- a/plugins/org.eclipse.osee.cluster.admin.hazelcast/.project +++ b/plugins/org.eclipse.osee.cluster.rest/.project @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <projectDescription> - <name>org.eclipse.osee.cluster.admin.hazelcast</name> + <name>org.eclipse.osee.cluster.rest</name> <comment></comment> <projects> </projects> diff --git a/plugins/org.eclipse.osee.cluster.admin.rest/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.cluster.rest/META-INF/MANIFEST.MF index cceaf335645..846cbb735ae 100644 --- a/plugins/org.eclipse.osee.cluster.admin.rest/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.osee.cluster.rest/META-INF/MANIFEST.MF @@ -1,11 +1,11 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 -Bundle-Name: Cluster Admin Rest -Bundle-SymbolicName: org.eclipse.osee.cluster.admin.rest +Bundle-Name: OSEE Cluster Rest +Bundle-SymbolicName: org.eclipse.osee.cluster.rest Bundle-Version: 0.9.9.qualifier Bundle-Vendor: Eclipse Open System Engineering Environment Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Service-Component: OSGI-INF/*.xml Import-Package: javax.ws.rs, javax.ws.rs.core, - org.eclipse.osee.cluster.admin + org.eclipse.osee.cluster diff --git a/plugins/org.eclipse.osee.cluster.rest/OSGI-INF/cluster.rest.application.xml b/plugins/org.eclipse.osee.cluster.rest/OSGI-INF/cluster.rest.application.xml new file mode 100644 index 00000000000..589c2bdd3e0 --- /dev/null +++ b/plugins/org.eclipse.osee.cluster.rest/OSGI-INF/cluster.rest.application.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osee.cluster.rest.internal.ClusterRestApplication"> + <implementation class="org.eclipse.osee.cluster.rest.internal.ClusterRestApplication"/> + <service> + <provide interface="javax.ws.rs.core.Application"/> + </service> + <property name="context.name" type="String" value="cluster"/> + <reference bind="setClusterService" cardinality="1..1" interface="org.eclipse.osee.cluster.ClusterService" name="ClusterService" policy="static"/> +</scr:component>
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.cluster.admin.rest/build.properties b/plugins/org.eclipse.osee.cluster.rest/build.properties index b07384a9d60..80e0032caae 100644 --- a/plugins/org.eclipse.osee.cluster.admin.rest/build.properties +++ b/plugins/org.eclipse.osee.cluster.rest/build.properties @@ -3,5 +3,5 @@ output.. = bin/ bin.includes = META-INF/,\ .,\ OSGI-INF/ -additional.bundles = org.eclipse.osee.cluster.admin,\ +additional.bundles = org.eclipse.osee.cluster,\ javax.ws.rs diff --git a/plugins/org.eclipse.osee.cluster.admin.rest/src/org/eclipse/osee/cluster/admin/rest/internal/ClusterAdminApplication.java b/plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/ClusterRestApplication.java index 9d614ff20b3..5c3f2baf042 100644 --- a/plugins/org.eclipse.osee.cluster.admin.rest/src/org/eclipse/osee/cluster/admin/rest/internal/ClusterAdminApplication.java +++ b/plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/ClusterRestApplication.java @@ -8,34 +8,34 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin.rest.internal; +package org.eclipse.osee.cluster.rest.internal; import java.util.HashSet; import java.util.Set; import javax.ws.rs.core.Application; -import org.eclipse.osee.cluster.admin.ClusterAdmin; -import org.eclipse.osee.cluster.admin.Member; +import org.eclipse.osee.cluster.ClusterService; +import org.eclipse.osee.cluster.Member; /** * A service for clients to obtain information about the cluster. * * @author Roberto E. Escobar */ -public class ClusterAdminApplication extends Application { +public class ClusterRestApplication extends Application { - private static ClusterAdmin clusterAdmin; + private static ClusterService clusterService; - public void setClusterAdmin(ClusterAdmin clusterAdmin) { - ClusterAdminApplication.clusterAdmin = clusterAdmin; + public void setClusterService(ClusterService clusterService) { + ClusterRestApplication.clusterService = clusterService; } - public static ClusterAdmin getClusterAdmin() { - return clusterAdmin; + public static ClusterService getClusterService() { + return clusterService; } public static Set<Member> getMembers() { - ClusterAdmin admin = ClusterAdminApplication.getClusterAdmin(); - return admin.getCluster().getMembers(); + ClusterService service = ClusterRestApplication.getClusterService(); + return service.getCluster().getMembers(); } @Override diff --git a/plugins/org.eclipse.osee.cluster.admin.rest/src/org/eclipse/osee/cluster/admin/rest/internal/ClusterUtil.java b/plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/ClusterUtil.java index 01c885d057d..cd8ae1bf28e 100644 --- a/plugins/org.eclipse.osee.cluster.admin.rest/src/org/eclipse/osee/cluster/admin/rest/internal/ClusterUtil.java +++ b/plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/ClusterUtil.java @@ -8,10 +8,10 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin.rest.internal; +package org.eclipse.osee.cluster.rest.internal; import java.net.InetSocketAddress; -import org.eclipse.osee.cluster.admin.Member; +import org.eclipse.osee.cluster.Member; /** * @author Roberto E. Escobar diff --git a/plugins/org.eclipse.osee.cluster.admin.rest/src/org/eclipse/osee/cluster/admin/rest/internal/JobsResource.java b/plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/JobsResource.java index 063298829ba..e53a463ee2c 100644 --- a/plugins/org.eclipse.osee.cluster.admin.rest/src/org/eclipse/osee/cluster/admin/rest/internal/JobsResource.java +++ b/plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/JobsResource.java @@ -8,7 +8,7 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin.rest.internal; +package org.eclipse.osee.cluster.rest.internal; import javax.ws.rs.Path; diff --git a/plugins/org.eclipse.osee.cluster.admin.rest/src/org/eclipse/osee/cluster/admin/rest/internal/MemberResource.java b/plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/MemberResource.java index b1b94150479..37eed140330 100644 --- a/plugins/org.eclipse.osee.cluster.admin.rest/src/org/eclipse/osee/cluster/admin/rest/internal/MemberResource.java +++ b/plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/MemberResource.java @@ -8,7 +8,7 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin.rest.internal; +package org.eclipse.osee.cluster.rest.internal; import javax.ws.rs.GET; import javax.ws.rs.Produces; @@ -16,8 +16,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Request; import javax.ws.rs.core.UriInfo; -import org.eclipse.osee.cluster.admin.ClusterAdmin; -import org.eclipse.osee.cluster.admin.Member; +import org.eclipse.osee.cluster.Member; /** * @author Roberto E. Escobar @@ -58,8 +57,7 @@ public class MemberResource { private XmlMember toXmlMember(String id) { XmlMember toReturn = null; - ClusterAdmin admin = ClusterAdminApplication.getClusterAdmin(); - for (Member member : admin.getCluster().getMembers()) { + for (Member member : ClusterRestApplication.getMembers()) { String memberId = ClusterUtil.asId(member.getInetSocketAddress()); if (memberId.equals(id)) { toReturn = ClusterUtil.fromMember(member); diff --git a/plugins/org.eclipse.osee.cluster.admin.rest/src/org/eclipse/osee/cluster/admin/rest/internal/MembersResource.java b/plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/MembersResource.java index 94cba8f5b81..5af2415eedb 100644 --- a/plugins/org.eclipse.osee.cluster.admin.rest/src/org/eclipse/osee/cluster/admin/rest/internal/MembersResource.java +++ b/plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/MembersResource.java @@ -8,7 +8,7 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin.rest.internal; +package org.eclipse.osee.cluster.rest.internal; import java.util.ArrayList; import java.util.List; @@ -20,7 +20,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Request; import javax.ws.rs.core.UriInfo; -import org.eclipse.osee.cluster.admin.Member; +import org.eclipse.osee.cluster.Member; /** * @author Roberto E. Escobar @@ -37,7 +37,7 @@ public class MembersResource { @Produces(MediaType.TEXT_XML) public List<XmlMember> getMemberBrowser() { List<XmlMember> todos = new ArrayList<XmlMember>(); - for (Member member : ClusterAdminApplication.getMembers()) { + for (Member member : ClusterRestApplication.getMembers()) { todos.add(ClusterUtil.fromMember(member)); } return todos; @@ -47,7 +47,7 @@ public class MembersResource { @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) public List<XmlMember> getMembers() { List<XmlMember> todos = new ArrayList<XmlMember>(); - for (Member member : ClusterAdminApplication.getMembers()) { + for (Member member : ClusterRestApplication.getMembers()) { todos.add(ClusterUtil.fromMember(member)); } return todos; @@ -57,7 +57,7 @@ public class MembersResource { @Path("count") @Produces(MediaType.TEXT_PLAIN) public String getCount() { - int count = ClusterAdminApplication.getMembers().size(); + int count = ClusterRestApplication.getMembers().size(); return String.valueOf(count); } diff --git a/plugins/org.eclipse.osee.cluster.admin.rest/src/org/eclipse/osee/cluster/admin/rest/internal/XmlMember.java b/plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/XmlMember.java index 83f822bccc5..ad0e678b22c 100644 --- a/plugins/org.eclipse.osee.cluster.admin.rest/src/org/eclipse/osee/cluster/admin/rest/internal/XmlMember.java +++ b/plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/XmlMember.java @@ -8,7 +8,7 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin.rest.internal; +package org.eclipse.osee.cluster.rest.internal; import javax.xml.bind.annotation.XmlRootElement; diff --git a/plugins/org.eclipse.osee.cluster.admin/.classpath b/plugins/org.eclipse.osee.cluster/.classpath index ad32c83a788..ad32c83a788 100644 --- a/plugins/org.eclipse.osee.cluster.admin/.classpath +++ b/plugins/org.eclipse.osee.cluster/.classpath diff --git a/plugins/org.eclipse.osee.cluster.admin/.project b/plugins/org.eclipse.osee.cluster/.project index e329ec0dc01..efdc49f6fb6 100644 --- a/plugins/org.eclipse.osee.cluster.admin/.project +++ b/plugins/org.eclipse.osee.cluster/.project @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <projectDescription> - <name>org.eclipse.osee.cluster.admin</name> + <name>org.eclipse.osee.cluster</name> <comment></comment> <projects> </projects> diff --git a/plugins/org.eclipse.osee.cluster/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.cluster/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..c23ad223a10 --- /dev/null +++ b/plugins/org.eclipse.osee.cluster/META-INF/MANIFEST.MF @@ -0,0 +1,8 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: OSEE Cluster +Bundle-SymbolicName: org.eclipse.osee.cluster +Bundle-Version: 0.9.9.qualifier +Bundle-Vendor: Eclipse Open System Engineering Environment +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Export-Package: org.eclipse.osee.cluster diff --git a/plugins/org.eclipse.osee.cluster.admin/build.properties b/plugins/org.eclipse.osee.cluster/build.properties index 34d2e4d2dad..34d2e4d2dad 100644 --- a/plugins/org.eclipse.osee.cluster.admin/build.properties +++ b/plugins/org.eclipse.osee.cluster/build.properties diff --git a/plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/Callback.java b/plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/Callback.java index 15ecdf34050..ea0fbd1ff69 100644 --- a/plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/Callback.java +++ b/plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/Callback.java @@ -8,7 +8,7 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin; +package org.eclipse.osee.cluster; import java.util.concurrent.Future; diff --git a/plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/Cluster.java b/plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/Cluster.java index 2ab3aaf1d60..8053eb9767c 100644 --- a/plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/Cluster.java +++ b/plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/Cluster.java @@ -8,7 +8,7 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin; +package org.eclipse.osee.cluster; import java.util.Set; diff --git a/plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/ClusterAdminConstants.java b/plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/ClusterConstants.java index bba6084f9f3..e08b41cf734 100644 --- a/plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/ClusterAdminConstants.java +++ b/plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/ClusterConstants.java @@ -8,12 +8,12 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin; +package org.eclipse.osee.cluster; /** * @author Roberto E. Escobar */ -public class ClusterAdminConstants { +public class ClusterConstants { public static final String CLUSTER_CONFIG_URL = "cluster.config.url"; diff --git a/plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/ClusterAdmin.java b/plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/ClusterService.java index fe9482848e6..4a6f5b147fe 100644 --- a/plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/ClusterAdmin.java +++ b/plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/ClusterService.java @@ -8,14 +8,14 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin; +package org.eclipse.osee.cluster; import java.util.concurrent.Callable; /** * @author Roberto E. Escobar */ -public interface ClusterAdmin { +public interface ClusterService { /** * The name of this cluster instance diff --git a/plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/ClusterServiceUtils.java b/plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/ClusterServiceUtils.java index 2ff4d2ddfdd..9e020b04373 100644 --- a/plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/ClusterServiceUtils.java +++ b/plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/ClusterServiceUtils.java @@ -8,7 +8,7 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin; +package org.eclipse.osee.cluster; import java.util.HashMap; import java.util.Map; @@ -50,7 +50,7 @@ public final class ClusterServiceUtils { } public static String getConfigurationURL(Map<String, Object> properties) { - return (String) properties.get(ClusterAdminConstants.CLUSTER_CONFIG_URL); + return (String) properties.get(ClusterConstants.CLUSTER_CONFIG_URL); } } diff --git a/plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/DistributedExecutorService.java b/plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/DistributedExecutorService.java index f39f132ce25..2b7e23864ea 100644 --- a/plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/DistributedExecutorService.java +++ b/plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/DistributedExecutorService.java @@ -8,7 +8,7 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin; +package org.eclipse.osee.cluster; import java.util.Set; import java.util.concurrent.Callable; diff --git a/plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/Member.java b/plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/Member.java index 4b093478bf9..2459b79b331 100644 --- a/plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/Member.java +++ b/plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/Member.java @@ -8,7 +8,7 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin; +package org.eclipse.osee.cluster; import java.net.InetSocketAddress; diff --git a/plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/Transaction.java b/plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/Transaction.java index 9296b6544c6..805dd7dcaee 100644 --- a/plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/Transaction.java +++ b/plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/Transaction.java @@ -8,7 +8,7 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin; +package org.eclipse.osee.cluster; /** * @author Roberto E. Escobar diff --git a/plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/TransactionWork.java b/plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/TransactionWork.java index e7f523fece0..0d11028ed45 100644 --- a/plugins/org.eclipse.osee.cluster.admin/src/org/eclipse/osee/cluster/admin/TransactionWork.java +++ b/plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/TransactionWork.java @@ -8,7 +8,7 @@ * Contributors: * Boeing - initial API and implementation *******************************************************************************/ -package org.eclipse.osee.cluster.admin; +package org.eclipse.osee.cluster; /** * @author Roberto E. Escobar diff --git a/plugins/org.eclipse.osee.distributed/src/org/eclipse/osee/distributed/AtomicNumber.java b/plugins/org.eclipse.osee.distributed/src/org/eclipse/osee/distributed/AtomicNumber.java index 60e91776d75..8e3685bfd46 100644 --- a/plugins/org.eclipse.osee.distributed/src/org/eclipse/osee/distributed/AtomicNumber.java +++ b/plugins/org.eclipse.osee.distributed/src/org/eclipse/osee/distributed/AtomicNumber.java @@ -10,7 +10,6 @@ *******************************************************************************/ package org.eclipse.osee.distributed; - /** * @author Roberto E. Escobar */ @@ -30,9 +29,6 @@ public interface AtomicNumber extends DistributedObject, HasName { long getAndSet(long newValue); - void lazySet(long newValue); - boolean compareAndSet(long expect, long update); - boolean weakCompareAndSet(long expect, long update); }
\ No newline at end of file |