00001 /* 00002 * Copyright (c) 2000, 2020, Oracle and/or its affiliates. 00003 * 00004 * Licensed under the Universal Permissive License v 1.0 as shown at 00005 * http://oss.oracle.com/licenses/upl. 00006 */ 00007 #ifndef COH_INVOCATION_SERVICE_HPP 00008 #define COH_INVOCATION_SERVICE_HPP 00009 00010 #include "coherence/lang.ns" 00011 00012 #include "coherence/net/Invocable.hpp" 00013 #include "coherence/net/Service.hpp" 00014 #include "coherence/util/Map.hpp" 00015 #include "coherence/util/Set.hpp" 00016 00017 COH_OPEN_NAMESPACE2(coherence,net) 00018 00019 using coherence::util::Map; 00020 using coherence::util::Set; 00021 00022 00023 /** 00024 * The InvocationService is a Service for delivering executable objects to the 00025 * cluster member to which the client is connected. The executable objects 00026 * must implement the Invocable interface, which extends the Runnable 00027 * interface. Using this interface, application code can cause execution of an 00028 * Invocable object to occur within the cluster. 00029 * 00030 * @author jh 2007.12.21 00031 */ 00032 class COH_EXPORT InvocationService 00033 : public interface_spec<InvocationService, 00034 implements<Service> > 00035 { 00036 // ----- InvocationService interface ------------------------------------ 00037 00038 public: 00039 /** 00040 * Synchronously invoke the specified task on each of the specified 00041 * members. This method will not return until the specified members 00042 * have completed their processing, failed in their processing, or 00043 * died trying. 00044 * <p> 00045 * Currently, the client implementation of this interface only 00046 * supports invocation on the cluster member to which the client is 00047 * connected. Therefore, the specified Set of Member objects must 00048 * be NULL. 00049 * 00050 * @param hTask the Invocable object to distribute to the 00051 * specified members in order to be invoked on 00052 * those members 00053 * @param vSetMembers must be NULL (future use) 00054 * 00055 * @return a Map of result objects keyed by Member object 00056 */ 00057 virtual Map::View query(Invocable::Handle hTask, Set::View vSetMembers) = 0; 00058 }; 00059 00060 COH_CLOSE_NAMESPACE2 00061 00062 #endif // COH_INVOCATION_SERVICE_HPP