roxiecommlib.hpp 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*##############################################################################
  2. HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. ############################################################################## */
  13. #ifndef ROXIECOMMLIB_INCL
  14. #define ROXIECOMMLIB_INCL
  15. #ifdef ROXIECOMMLIB_EXPORTS
  16. #define ROXIECOMMLIB_API DECL_EXPORT
  17. #else
  18. #define ROXIECOMMLIB_API DECL_IMPORT
  19. #endif
  20. #define ROXIECOMM_SOCKET_ERROR 1450
  21. #include "esp.hpp"
  22. #include "jptree.hpp"
  23. #include "jsocket.hpp"
  24. interface IUserDescriptor;
  25. interface IRoxieCommunicationClient : extends IInterface
  26. {
  27. virtual IPropertyTree *sendRoxieControlRequest(const char *xml, bool lockAll) = 0;
  28. virtual const char *sendRoxieOnDemandRequest(const char *xml, SCMStringBuffer &repsonse, bool lockAll) = 0;
  29. virtual void sendRoxieReloadControlRequest() = 0;
  30. virtual IPropertyTree *retrieveQuery(const char *id) = 0;
  31. virtual IPropertyTree *retrieveAllQueryInfo(const char *id) = 0;
  32. virtual IPropertyTree *retrieveState() = 0;
  33. virtual IPropertyTree *retrieveQueryStats(const char *queryName, const char *action, const char *graphName, bool lockAll) = 0;
  34. virtual const char *queryRoxieClusterName(SCMStringBuffer &clusterName) = 0;
  35. virtual IPropertyTree *retrieveQueryWuInfo(const char *queryName) = 0;
  36. virtual IPropertyTree *retrieveTopology() = 0;
  37. virtual bool updateQueryComment(const char *id, const char *comment, bool append) = 0;
  38. virtual bool updateACLInfo(bool allow, const char *restrict_ip, const char *mask, const char *query, const char *errorMsg, int errorCode, const char *roxieAddress, SCMStringBuffer &status) = 0;
  39. virtual IPropertyTree *queryACLInfo() = 0;
  40. virtual IPropertyTree *retrieveRoxieQueryMetrics(SCMStringBuffer &queryName, SCMStringBuffer &startDateTime, SCMStringBuffer &endDateTime) = 0;
  41. virtual IPropertyTree *retrieveRoxieMetrics(StringArray &ipList) = 0;
  42. virtual IPropertyTree *listLibrariesUsedByQuery(const char *id, bool useAliasNames) = 0;
  43. virtual IPropertyTree *listQueriesUsingLibrary(const char *id) = 0;
  44. virtual IPropertyTree *retrieveQueryActivityInfo(const char *id, int activityId) = 0;
  45. virtual unsigned retrieveRoxieStateRevision() = 0;
  46. virtual IPropertyTree *getRoxieBuildVersion() = 0;
  47. virtual IPropertyTree *sendRoxieControlAllNodes(const char *msg, bool allOrNothing) = 0;
  48. virtual IPropertyTree *sendRoxieControlAllNodes(ISocket *sock, const char *msg, bool allOrNothing, unsigned wait) = 0;
  49. virtual IPropertyTree *sendRoxieControlQuery(ISocket *sock, const char *msg, unsigned wait) = 0;
  50. };
  51. extern "C" ROXIECOMMLIB_API IRoxieCommunicationClient *createRoxieCommunicationClient(const SocketEndpoint &roxieEP, unsigned roxieTimeout);
  52. #endif