Ice 3.8
Slice API Reference
Loading...
Searching...
No Matches
Admin.ice
1// Copyright (c) ZeroC, Inc.
2
3#pragma once
4
5[["cpp:dll-export:ICEGRID_API"]]
6[["cpp:doxygen:include:IceGrid/IceGrid.h"]]
7[["cpp:header-ext:h"]]
8
9[["cpp:include:IceGrid/Config.h"]]
10
11[["js:module:@zeroc/ice"]]
12
13#include "Descriptor.ice"
14#include "Exception.ice"
15#include "Glacier2/Session.ice"
16#include "Ice/BuiltinSequences.ice"
17#include "Ice/Identity.ice"
18
19["java:identifier:com.zeroc.IceGrid"]
20module IceGrid
21{
22 interface Registry; // So that doc-comments can link to `IceGrid::Registry`.
23
24 /// Represents the state of a server.
26 {
27 /// The server is not running.
28 ["swift:identifier:inactive"]
30
31 /// The server is being activated and will change to the active state when the registered server object adapters
32 /// are activated or to the activation timed out state if the activation timeout expires.
33 ["swift:identifier:activating"]
35
36 /// The server activation timed out.
37 ["swift:identifier:activationTimedOut"]
39
40 /// The server is running.
41 ["swift:identifier:active"]
43
44 /// The server is being deactivated.
45 ["swift:identifier:deactivating"]
47
48 /// The server is being destroyed.
49 ["swift:identifier:destroying"]
51
52 /// The server is destroyed.
53 ["swift:identifier:destroyed"]
55 }
56
57 /// A dictionary of string to proxies.
58 dictionary<string, Object*> StringObjectProxyDict;
59
60 /// Information about an Ice well-known object.
62 {
63 /// The proxy of the object.
64 Object* proxy;
65
66 /// The type of the object.
67 string type;
68 }
69
70 /// A sequence of {@link ObjectInfo}.
71 sequence<ObjectInfo> ObjectInfoSeq;
72
73 /// Information about an adapter registered with the IceGrid registry.
75 {
76 /// The ID of the adapter.
77 string id;
78
79 /// A dummy direct proxy that contains the adapter endpoints.
80 Object* proxy;
81
82 /// The replica group ID of the object adapter, or empty if the adapter doesn't belong to a replica group.
84 }
85
86 /// A sequence of {@link AdapterInfo}.
87 sequence<AdapterInfo> AdapterInfoSeq;
88
89 /// Information about a server managed by an IceGrid node.
91 {
92 /// The application to which this server belongs.
94
95 /// The application UUID.
96 string uuid;
97
98 /// The application revision.
100
101 /// The IceGrid node where this server is deployed.
102 string node;
103
104 /// The server descriptor.
106
107 /// The ID of the session which allocated the server.
108 string sessionId;
109 }
110
111 /// Information about an IceGrid node.
112 struct NodeInfo
113 {
114 /// The name of the node.
115 string name;
116
117 /// The operating system name.
118 string os;
119
120 /// The network name of the host running this node.
121 string hostname;
122
123 /// The operation system release level.
124 string release;
125
126 /// The operation system version.
127 string version;
128
129 /// The machine hardware type.
130 string machine;
131
132 /// The number of processor threads on the node.
133 /// For example, nProcessors is 8 on a computer with a single quad-core processor and two threads per core.
135
136 /// The path to the node data directory.
137 string dataDir;
138 }
139
140 /// Information about an IceGrid registry replica.
142 {
143 /// The name of the registry.
144 string name;
145
146 /// The network name of the host running this registry.
147 string hostname;
148 }
149
150 /// A sequence of {@link RegistryInfo}.
151 sequence<RegistryInfo> RegistryInfoSeq;
152
153 /// Information about the load of a node.
154 struct LoadInfo
155 {
156 /// The load average over the past minute.
157 float avg1;
158
159 /// The load average over the past 5 minutes.
160 float avg5;
161
162 /// The load average over the past 15 minutes.
163 float avg15;
164 }
165
166 /// Information about an IceGrid application.
168 {
169 /// Unique application identifier.
170 string uuid;
171
172 /// The creation time.
174
175 /// The user who created the application.
177
178 /// The last update time.
180
181 /// The user who updated the application.
183
184 /// The application revision number.
186
187 /// The application descriptor.
189 }
190
191 /// A sequence of {@link ApplicationInfo}.
192 ["java:type:java.util.LinkedList<ApplicationInfo>"]
193 sequence<ApplicationInfo> ApplicationInfoSeq;
194
195 /// Information about updates to an IceGrid application.
197 {
198 /// The update time.
200
201 /// The user who updated the application.
203
204 /// The application revision number.
206
207 /// The update descriptor.
209 }
210
211 /// Provides administrative access to an IceGrid deployment.
212 interface Admin
213 {
214 /// Adds an application to IceGrid.
215 /// @param descriptor The application descriptor.
216 /// @throws AccessDeniedException Thrown when the session doesn't hold the exclusive lock or when another
217 /// session is holding the lock.
218 /// @throws DeploymentException Thrown when the application deployment failed.
221
222 /// Synchronizes a deployed application. This operation replaces the current descriptor with a new descriptor.
223 /// @param descriptor The new application descriptor.
224 /// @throws AccessDeniedException Thrown when the session doesn't hold the exclusive lock or when another
225 /// session is holding the lock.
226 /// @throws DeploymentException Thrown when the application deployment failed.
227 /// @throws ApplicationNotExistException Thrown when the application doesn't exist.
230
231 /// Updates a deployed application.
232 /// @param descriptor The update descriptor.
233 /// @throws AccessDeniedException Thrown when the session doesn't hold the exclusive lock or when another
234 /// session is holding the lock.
235 /// @throws DeploymentException Thrown when the application deployment failed.
236 /// @throws ApplicationNotExistException Thrown when the application doesn't exist.
239
240 /// Synchronizes a deployed application. This operation replaces the current descriptor with a new descriptor
241 /// only if no server restarts are necessary for the update of the application. If some servers need to be
242 /// restarted, the synchronization is rejected with a DeploymentException.
243 /// @param descriptor The application descriptor.
244 /// @throws AccessDeniedException Thrown when the session doesn't hold the exclusive lock or when another
245 /// session is holding the lock.
246 /// @throws DeploymentException Thrown when the application deployment failed.
247 /// @throws ApplicationNotExistException Thrown when the application doesn't exist.
250
251 /// Updates a deployed application. This operation succeeds only when no server restarts are necessary for the
252 /// update of the application. If some servers need to be restarted, the synchronization is rejected with a
253 /// DeploymentException.
254 /// @param descriptor The update descriptor.
255 /// @throws AccessDeniedException Thrown when the session doesn't hold the exclusive lock or when another
256 /// session is holding the lock.
257 /// @throws DeploymentException Thrown when the application deployment failed.
258 /// @throws ApplicationNotExistException Thrown when the application doesn't exist.
261
262 /// Removes an application from IceGrid.
263 /// @param name The application name.
264 /// @throws AccessDeniedException Thrown when the session doesn't hold the exclusive lock or when another
265 /// session is holding the lock.
266 /// @throws DeploymentException Thrown when the application deployment failed.
267 /// @throws ApplicationNotExistException Thrown when the application doesn't exist.
268 void removeApplication(string name)
270
271 /// Instantiates a server template.
272 /// @param application The application name.
273 /// @param node The name of the node where the server will be deployed.
274 /// @param desc The descriptor of the server instance to deploy.
275 /// @throws AccessDeniedException Thrown when the session doesn't hold the exclusive lock or when another
276 /// session is holding the lock.
277 /// @throws DeploymentException Thrown when the application deployment failed.
278 /// @throws ApplicationNotExistException Thrown when the application doesn't exist.
279 void instantiateServer(string application, string node, ServerInstanceDescriptor desc)
281
282 /// Gets an application descriptor.
283 /// @param name The application name.
284 /// @return The application descriptor.
285 /// @throws ApplicationNotExistException Thrown when the application doesn't exist.
286 ["cpp:const"]
287 idempotent ApplicationInfo getApplicationInfo(string name)
289
290 /// Gets the default application descriptor.
291 /// @return The default application descriptor.
292 /// @throws DeploymentException Thrown when the default application descriptor is invalid or unreachable.
293 ["cpp:const"]
295 throws DeploymentException;
296
297 /// Gets all the IceGrid applications currently registered.
298 /// @return The application names.
299 ["cpp:const"]
300 idempotent Ice::StringSeq getAllApplicationNames();
301
302 /// Gets information about a server.
303 /// @param id The server ID.
304 /// @throws ServerNotExistException Thrown when the server doesn't exist.
305 /// @return The server information.
306 ["cpp:const"]
307 idempotent ServerInfo getServerInfo(string id)
309
310 /// Gets the state of a server.
311 /// @param id The server ID.
312 /// @return The server state.
313 /// @throws ServerNotExistException Thrown when the server doesn't exist.
314 /// @throws NodeUnreachableException Thrown when the node is unreachable.
315 /// @throws DeploymentException Thrown when the deployment of the server failed.
316 ["cpp:const"]
317 idempotent ServerState getServerState(string id)
319
320 /// Gets the system process ID of a server. The process ID is operating system dependent.
321 /// @param id The server ID.
322 /// @return The process ID.
323 /// @throws ServerNotExistException Thrown when the server doesn't exist.
324 /// @throws NodeUnreachableException Thrown when the node is unreachable.
325 /// @throws DeploymentException Thrown when the deployment of the server failed.
326 ["cpp:const"]
327 idempotent int getServerPid(string id)
329
330 /// Gets the category for server admin objects. You can manufacture a server admin proxy from the admin proxy by
331 /// changing its identity: use the server ID as name and the returned category as category.
332 /// @return The category for server admin objects.
333 ["cpp:const"]
334 idempotent string getServerAdminCategory();
335
336 /// Gets a proxy to the admin object of a server.
337 /// @param id The server ID.
338 /// @return A proxy to the admin object of the server. This proxy is never null.
339 /// @throws ServerNotExistException Thrown when the server doesn't exist.
340 /// @throws NodeUnreachableException Thrown when the node is unreachable.
341 /// @throws DeploymentException Thrown when the deployment of the server failed.
342 ["cpp:const"]
343 idempotent Object* getServerAdmin(string id)
345
346 /// Enables or disables a server. A disabled server can't be started on demand or administratively. The enable
347 /// state of the server is not persistent: if the node is shut down and restarted, the server will be enabled by
348 /// default.
349 /// @param id The server ID.
350 /// @param enabled `true` to enable the server, `false` to disable it.
351 /// @throws ServerNotExistException Thrown when the server doesn't exist.
352 /// @throws NodeUnreachableException Thrown when the node is unreachable.
353 /// @throws DeploymentException Thrown when the deployment of the server failed.
354 idempotent void enableServer(string id, bool enabled)
356
357 /// Checks if the server is enabled or disabled.
358 /// @param id The server ID.
359 /// @return `true` if the server is enabled, `false` otherwise.
360 /// @throws ServerNotExistException Thrown when the server doesn't exist.
361 /// @throws NodeUnreachableException Thrown when the node is unreachable.
362 /// @throws DeploymentException Thrown when the deployment of the server failed.
363 ["cpp:const"]
364 idempotent bool isServerEnabled(string id)
366
367 /// Starts a server and waits for its activation.
368 /// @param id The server id.
369 /// @throws ServerNotExistException Thrown when the server doesn't exist.
370 /// @throws ServerStartException Thrown when the server startup failed.
371 /// @throws NodeUnreachableException Thrown when the node is unreachable.
372 /// @throws DeploymentException Thrown when the deployment of the server failed.
373 ["amd"]
374 void startServer(string id)
376
377 /// Stops a server.
378 /// @param id The server ID.
379 /// @throws ServerNotExistException Thrown when the server doesn't exist.
380 /// @throws ServerStopException Thrown when the server stop failed.
381 /// @throws NodeUnreachableException Thrown when the node is unreachable.
382 /// @throws DeploymentException Thrown when the deployment of the server failed.
383 ["amd"]
384 void stopServer(string id)
386
387 /// Sends a signal to a server.
388 /// @param id The server ID.
389 /// @param signal The signal, for example SIGTERM or 15.
390 /// @throws ServerNotExistException Thrown when the server doesn't exist.
391 /// @throws NodeUnreachableException Thrown when the node is unreachable.
392 /// @throws DeploymentException Thrown when the deployment of the server failed.
393 /// @throws BadSignalException Thrown when the signal is not recognized by the target server.
394 void sendSignal(string id, string signal)
396
397 /// Gets the IDs of all the servers registered with IceGrid.
398 /// @return The server IDs.
399 ["cpp:const"]
400 idempotent Ice::StringSeq getAllServerIds();
401
402 /// Gets adapter information for the replica group or adapter with the given ID.
403 /// @param id The adapter or replica group ID.
404 /// @return A sequence of AdapterInfo. If @p id refers to an adapter, this sequence contains a single element.
405 /// If @p id refers to a replica group, this sequence contains adapter information for each member of the
406 /// replica group.
407 /// @throws AdapterNotExistException Thrown when the adapter or replica group doesn't exist.
408 ["cpp:const"]
409 idempotent AdapterInfoSeq getAdapterInfo(string id)
411
412 /// Removes the adapter with the given ID.
413 /// @param id The adapter ID.
414 /// @throws AdapterNotExistException Thrown when the adapter doesn't exist.
415 /// @throws DeploymentException Thrown when the application deployment failed.
416 void removeAdapter(string id)
418
419 /// Gets the IDs of all adapters registered with IceGrid.
420 /// @return The adapter IDs.
421 ["cpp:const"]
422 idempotent Ice::StringSeq getAllAdapterIds();
423
424 /// Adds an object to the object registry. IceGrid gets the object type by calling `ice_id` on @p obj. The
425 /// object must be reachable.
426 /// @param obj A proxy to the object. This proxy is never null.
427 /// @throws ObjectExistsException Thrown when the object is already registered.
428 /// @throws DeploymentException Thrown when the object can't be added.
429 void addObject(Object* obj)
431
432 /// Updates an object in the object registry. Only objects added with this interface can be updated with this
433 /// operation. Objects added with deployment descriptors should be updated with the deployment mechanism.
434 /// @param obj A proxy to the object. This proxy is never null.
435 /// @throws ObjectNotRegisteredException Thrown when the object isn't registered with the registry.
436 /// @throws DeploymentException Thrown when the object can't be updated.
437 void updateObject(Object* obj)
439
440 /// Adds an object to the object registry and explicitly specifies its type.
441 /// @param obj The object to be added to the registry. The proxy is never null.
442 /// @param type The type name.
443 /// @throws ObjectExistsException Thrown when the object is already registered.
444 /// @throws DeploymentException Thrown when the application deployment failed.
445 void addObjectWithType(Object* obj, string type)
447
448 /// Removes an object from the object registry. Only objects added with this interface can be removed with this
449 /// operation. Objects added with deployment descriptors should be removed with the deployment mechanism.
450 /// @param id The identity of the object to remove.
451 /// @throws ObjectNotRegisteredException Thrown when the object isn't registered with the registry.
452 /// @throws DeploymentException Thrown when the object can't be removed.
453 void removeObject(Ice::Identity id)
455
456 /// Gets the object info for the object.
457 /// @param id The identity of the object.
458 /// @return The object info.
459 /// @throws ObjectNotRegisteredException Thrown when the object isn't registered with the registry.
460 ["cpp:const"]
461 idempotent ObjectInfo getObjectInfo(Ice::Identity id)
463
464 /// Gets the object info of all the registered objects with a given type.
465 /// @param type The type name.
466 /// @return The object infos.
467 ["cpp:const"]
468 idempotent ObjectInfoSeq getObjectInfosByType(string type);
469
470 /// Gets the object info of all the registered objects whose stringified identities match the given expression.
471 /// @param expr The expression to match against the stringified identities of registered objects. The expression
472 /// may contain a trailing wildcard (`*`) character.
473 /// @return All the object infos with a stringified identity matching the given expression.
474 ["cpp:const"]
475 idempotent ObjectInfoSeq getAllObjectInfos(string expr);
476
477 /// Pings an IceGrid node to see if it is active.
478 /// @param name The node name.
479 /// @return `true` if the node ping succeeded, `false` otherwise.
480 /// @throws NodeNotExistException Thrown when the node doesn't exist.
481 ["cpp:const"]
482 idempotent bool pingNode(string name)
484
485 /// Gets the load averages of a node.
486 /// @param name The node name.
487 /// @return The node load information.
488 /// @throws NodeNotExistException Thrown when the node doesn't exist.
489 /// @throws NodeUnreachableException Thrown when the node is unreachable.
490 ["cpp:const"]
491 idempotent LoadInfo getNodeLoad(string name)
493
494 /// Gets the node information of a node.
495 /// @param name The node name.
496 /// @return The node information.
497 /// @throws NodeNotExistException Thrown when the node doesn't exist.
498 /// @throws NodeUnreachableException Thrown when the node is unreachable.
499 ["cpp:const"]
500 idempotent NodeInfo getNodeInfo(string name)
502
503 /// Gets a proxy to the admin object of an IceGrid node.
504 /// @param name The IceGrid node name.
505 /// @return A proxy to the IceGrid node's admin object. This proxy is never null.
506 /// @throws NodeNotExistException Thrown when the node doesn't exist.
507 /// @throws NodeUnreachableException Thrown when the node is unreachable.
508 ["cpp:const"]
509 idempotent Object* getNodeAdmin(string name)
511
512 /// Gets the number of physical processor sockets in the computer where an IceGrid node is deployed.
513 /// Note that this operation returns 1 on operating systems where this can't be automatically determined and
514 /// where the `IceGrid.Node.ProcessorSocketCount` property for the node is not set.
515 /// @param name The node name.
516 /// @return The number of processor sockets or 1 if the number of sockets can't be determined.
517 /// @throws NodeNotExistException Thrown when the node doesn't exist.
518 /// @throws NodeUnreachableException Thrown when the node is unreachable.
519 ["cpp:const"]
520 idempotent int getNodeProcessorSocketCount(string name)
522
523 /// Shuts down an IceGrid node.
524 /// @param name The node name.
525 /// @throws NodeNotExistException Thrown when the node doesn't exist.
526 /// @throws NodeUnreachableException Thrown when the node is unreachable.
527 void shutdownNode(string name)
529
530 /// Get the hostname of a node.
531 /// @param name The node name.
532 /// @return The node hostname.
533 /// @throws NodeNotExistException Thrown when the node doesn't exist.
534 /// @throws NodeUnreachableException Thrown when the node is unreachable.
535 ["cpp:const"]
536 idempotent string getNodeHostname(string name)
538
539 /// Gets the names of all IceGrid nodes currently registered.
540 /// @return The node names.
541 ["cpp:const"]
542 idempotent Ice::StringSeq getAllNodeNames();
543
544 /// Pings an IceGrid registry to see if it is active.
545 /// @param name The registry name.
546 /// @return `true` if the registry ping succeeded, `false` otherwise.
547 /// @throws RegistryNotExistException Thrown when the registry doesn't exist.
548 ["cpp:const"]
549 idempotent bool pingRegistry(string name)
551
552 /// Gets the registry information of an IceGrid registry.
553 /// @param name The registry name.
554 /// @return The registry information.
555 /// @throws RegistryNotExistException Thrown when the registry doesn't exist.
556 /// @throws RegistryUnreachableException Thrown when the registry is unreachable.
557 ["cpp:const"]
558 idempotent RegistryInfo getRegistryInfo(string name)
560
561 /// Gets a proxy to the admin object of an IceGrid registry.
562 /// @param name The registry name.
563 /// @return A proxy to the admin object of an IceGrid registry. This proxy is never null.
564 /// @throws RegistryNotExistException Thrown when the registry doesn't exist.
565 ["cpp:const"]
566 idempotent Object* getRegistryAdmin(string name)
568
569 /// Shuts down an IceGrid registry.
570 /// @param name The registry name.
571 /// @throws RegistryNotExistException Thrown when the registry doesn't exist.
572 /// @throws RegistryUnreachableException Thrown when the registry is unreachable.
573 idempotent void shutdownRegistry(string name)
575
576 /// Gets the names of all the IceGrid registries currently registered.
577 /// @return The registry names.
578 ["cpp:const"]
579 idempotent Ice::StringSeq getAllRegistryNames();
580
581 /// Shuts down the IceGrid registry.
582 void shutdown();
583 }
584
585 /// Iterates over an IceGrid log file.
586 interface FileIterator
587 {
588 /// Read lines from the log file.
589 /// @param size Specifies the maximum number of bytes to be received. The server will ensure that the returned
590 /// message doesn't exceed the given size.
591 /// @param lines The lines read from the file. If there was nothing to read from the file since the last call to
592 /// read, an empty sequence is returned. The last line of the sequence is always incomplete (and therefore no
593 /// newline character should be added when writing the last line to the to the output device).
594 /// @return `true` if EOF is encountered.
595 /// @throws FileNotAvailableException Thrown when the implementation failed to read from the file.
596 bool read(int size, out Ice::StringSeq lines)
598
599 /// Destroys the iterator.
600 void destroy();
601 }
602
603 /// Dynamic information about the state of a server.
605 {
606 /// The ID of the server.
607 string id;
608
609 /// The state of the server.
611
612 /// The process ID of the server.
613 int pid;
614
615 /// Indicates whether the server is enabled.
617 }
618
619 /// A sequence of ServerDynamicInfo.
620 ["java:type:java.util.LinkedList<ServerDynamicInfo>"]
621 sequence<ServerDynamicInfo> ServerDynamicInfoSeq;
622
623 /// Dynamic information about the state of an adapter.
625 {
626 /// The id of the adapter.
627 string id;
628
629 /// The direct proxy containing the adapter endpoints. This proxy is never null.
630 Object* proxy;
631 }
632
633 /// A sequence of AdapterDynamicInfo.
634 ["java:type:java.util.LinkedList<AdapterDynamicInfo>"]
635 sequence<AdapterDynamicInfo> AdapterDynamicInfoSeq;
636
637 /// Dynamic information about the state of a node.
639 {
640 /// Some static information about the node.
642
643 /// The dynamic information of the servers deployed on this node.
645
646 /// The dynamic information of the adapters deployed on this node.
648 }
649
650 /// Monitors changes to the state of the registries.
652 {
653 /// Provides the initial state of the registries to the observer.
654 /// @param registries The current state of the registries.
656
657 /// Notifies the observer that a registry replica came up.
658 /// @param registryReplica The registry state.
659 void registryUp(RegistryInfo registryReplica);
660
661 /// Notifies the observer that a registry replica went down.
662 /// @param name The registry name.
663 void registryDown(string name);
664 }
665
666 /// A sequence of NodeDynamicInfo.
667 sequence<NodeDynamicInfo> NodeDynamicInfoSeq;
668
669 /// Monitors changes to the state of the nodes.
670 interface NodeObserver
671 {
672 /// Provides the initial state of the nodes to the observer.
673 /// @param nodes The current state of the nodes.
675
676 /// Notifies the observer that a node came up.
677 /// @param node The node state.
679
680 /// Notifies the observer that a node went down.
681 /// @param name The node name.
682 void nodeDown(string name);
683
684 /// Notifies the observer that the state of a server changed.
685 /// @param node The node hosting the server.
686 /// @param updatedInfo The new server state.
687 void updateServer(string node, ServerDynamicInfo updatedInfo);
688
689 /// Notifies the observer that the state of an object adapter changed.
690 /// @param node The node hosting the adapter.
691 /// @param updatedInfo The new adapter state.
692 void updateAdapter(string node, AdapterDynamicInfo updatedInfo);
693 }
694
695 /// Monitors applications.
697 {
698 /// Provides the initial application infos to the observer.
699 /// @param serial The current serial number of the registry database. This serial number allows observers to
700 /// make sure that their internal state is synchronized with the registry.
701 /// @param applications The applications currently registered with the registry.
702 void applicationInit(int serial, ApplicationInfoSeq applications);
703
704 /// Notifies the observer that an application was added.
705 /// @param serial The new serial number of the registry database.
706 /// @param desc The descriptor of the new application.
707 void applicationAdded(int serial, ApplicationInfo desc);
708
709 /// Notifies the observer that an application was removed.
710 /// @param serial The new serial number of the registry database.
711 /// @param name The name of the application that was removed.
712 void applicationRemoved(int serial, string name);
713
714 /// Notifies the observer that an application was updated.
715 /// @param serial The new serial number of the registry database.
716 /// @param desc The descriptor of the update.
718 }
719
720 /// Monitors dynamically-registered object adapters.
722 {
723 /// Provides the initial list of dynamically registered adapters to the observer.
724 /// @param adpts The adapters that were dynamically registered with the registry.
726
727 /// Notifies the observer that a dynamically-registered adapter was added.
728 /// @param info The details of the new adapter.
730
731 // Notifies the observer that a dynamically-registered adapter was updated.
732 /// @param info The details of the updated adapter.
734
735 /// Notifies the observer that a dynamically-registered adapter was removed.
736 /// @param id The ID of the removed adapter.
737 void adapterRemoved(string id);
738 }
739
740 /// Monitors well-known objects that are added, updated or removed using {@link Admin}.
742 {
743 /// Provides the initial list of well-known objects to the observer.
744 /// @param objects The well-known objects registered using {@link Admin}.
746
747 /// Notifies the observer that a well-known object was added.
748 /// @param info The details of the new object.
750
751 /// Notifies the observer that a well-known object was updated.
752 /// @param info The details of the updated object.
754
755 /// Notifies the observer that a well-known object was removed.
756 /// @param id The identity of the removed object.
758 }
759
760 /// Represents an administrative session between an admin tool and an IceGrid registry.
761 /// @see Registry
763 {
764 /// Keeps the session alive.
765 ["deprecated:As of Ice 3.8, there is no need to call this operation, and its implementation does nothing."]
766 idempotent void keepAlive();
767
768 /// Gets a proxy to the IceGrid admin object. The admin object returned by this operation can only be accessed
769 /// by the session.
770 /// @return A proxy to the IceGrid admin object. This proxy is never null.
771 ["cpp:const"]
772 idempotent Admin* getAdmin();
773
774 /// Gets a "template" proxy for admin callback objects. An Admin client uses this proxy to set the category of
775 /// its callback objects, and the published endpoints of the object adapter hosting the admin callback objects.
776 /// @return A template proxy. The returned proxy is null when the Admin session was established using Glacier2.
777 ["cpp:const"]
778 idempotent Object* getAdminCallbackTemplate();
779
780 /// Sets the observer proxies that receive notifications when the state of the registry or nodes changes.
781 /// @param registryObs The registry observer.
782 /// @param nodeObs The node observer.
783 /// @param appObs The application observer.
784 /// @param adptObs The adapter observer.
785 /// @param objObs The object observer.
786 /// @throws ObserverAlreadyRegisteredException Thrown when an observer is already registered with this registry.
787 idempotent void setObservers(
788 RegistryObserver* registryObs,
789 NodeObserver* nodeObs,
790 ApplicationObserver* appObs,
791 AdapterObserver* adptObs,
792 ObjectObserver* objObs)
794
795 /// Sets the observer identities that receive notifications when the state of the registry or nodes changes.
796 /// This operation should be used by clients that are using a bidirectional connection to communicate with the
797 /// session.
798 /// @param registryObs The registry observer identity.
799 /// @param nodeObs The node observer identity.
800 /// @param appObs The application observer.
801 /// @param adptObs The adapter observer.
802 /// @param objObs The object observer.
803 /// @throws ObserverAlreadyRegisteredException Thrown when an observer is already registered with this registry.
804 idempotent void setObserversByIdentity(
805 Ice::Identity registryObs,
806 Ice::Identity nodeObs,
807 Ice::Identity appObs,
808 Ice::Identity adptObs,
809 Ice::Identity objObs)
811
812 /// Acquires an exclusive lock to start updating the registry applications.
813 /// @return The current serial.
814 /// @throws AccessDeniedException Thrown when the exclusive lock can't be acquired. This might happen if the
815 /// lock is currently acquired by another session.
818
819 /// Finishes updating the registry and releases the exclusive lock.
820 /// @throws AccessDeniedException Thrown when the session doesn't hold the exclusive lock.
823
824 /// Gets the name of the registry replica hosting this session.
825 /// @return The replica name of the registry.
826 ["cpp:const"]
827 idempotent string getReplicaName();
828
829 /// Opens a server log file for reading.
830 /// @param id The server ID.
831 /// @param path The path of the log file. A log file can be opened only if it's declared in the server or
832 /// service deployment descriptor.
833 /// @param count Specifies where to start reading the file. If negative, the file is read from the beginning.
834 /// Otherwise, the file is read from the last @p count lines.
835 /// @return An iterator to read the file. This proxy is never null.
836 /// @throws FileNotAvailableException Thrown when the file can't be read.
837 /// @throws ServerNotExistException Thrown when the server doesn't exist.
838 /// @throws NodeUnreachableException Thrown when the node is unreachable.
839 /// @throws DeploymentException Thrown when the server couldn't be deployed on the node.
840 FileIterator* openServerLog(string id, string path, int count)
842
843 /// Opens a server stderr file for reading.
844 /// @param id The server ID.
845 /// @param count Specifies where to start reading the file. If negative, the file is read from the beginning.
846 /// Otherwise, the file is read from the last @p count lines.
847 /// @return An iterator to read the file. This proxy is never null.
848 /// @throws FileNotAvailableException Thrown when the file can't be read.
849 /// @throws ServerNotExistException Thrown when the server doesn't exist.
850 /// @throws NodeUnreachableException Thrown when the node is unreachable.
851 /// @throws DeploymentException Thrown when the server couldn't be deployed on the node.
852 FileIterator* openServerStdErr(string id, int count)
854
855 /// Opens a server stdout file for reading.
856 /// @param id The server id.
857 /// @param count Specifies where to start reading the file. If negative, the file is read from the beginning.
858 /// Otherwise, the file is read from the last @p count lines.
859 /// @return An iterator to read the file. This proxy is never null.
860 /// @throws FileNotAvailableException Thrown when the file can't be read.
861 /// @throws ServerNotExistException Thrown when the server doesn't exist.
862 /// @throws NodeUnreachableException Thrown when the node is unreachable.
863 /// @throws DeploymentException Thrown when the server couldn't be deployed on the node.
864 FileIterator* openServerStdOut(string id, int count)
866
867 /// Opens a node stderr file for reading.
868 /// @param name The node name.
869 /// @param count Specifies where to start reading the file. If negative, the file is read from the beginning.
870 /// Otherwise, the file is read from the last @p count lines.
871 /// @return An iterator to read the file. This proxy is never null.
872 /// @throws FileNotAvailableException Thrown when the file can't be read.
873 /// @throws NodeNotExistException Thrown when the node doesn't exist.
874 /// @throws NodeUnreachableException Thrown when the node is unreachable.
875 FileIterator* openNodeStdErr(string name, int count)
877
878 /// Opens a node stdout file for reading.
879 /// @param name The node name.
880 /// @param count Specifies where to start reading the file. If negative, the file is read from the beginning.
881 /// Otherwise, the file is read from the last @p count lines.
882 /// @return An iterator to read the file. This proxy is never null.
883 /// @throws FileNotAvailableException Thrown when the file can't be read.
884 /// @throws NodeNotExistException Thrown when the node doesn't exist.
885 /// @throws NodeUnreachableException Thrown when the node is unreachable.
886 FileIterator* openNodeStdOut(string name, int count)
888
889 /// Opens a registry stderr file for reading.
890 /// @param name The registry name.
891 /// @param count Specifies where to start reading the file. If negative, the file is read from the beginning.
892 /// Otherwise, the file is read from the last @p count lines.
893 /// @return An iterator to read the file. This proxy is never null.
894 /// @throws FileNotAvailableException Thrown when the file can't be read.
895 /// @throws RegistryNotExistException Thrown when the registry doesn't exist.
896 /// @throws RegistryUnreachableException Thrown when the registry is unreachable.
897 FileIterator* openRegistryStdErr(string name, int count)
899
900 /// Opens a registry stdout file for reading.
901 /// @param name The registry name.
902 /// @param count Specifies where to start reading the file. If negative, the file is read from the beginning.
903 /// Otherwise, the file is read from the last @p count lines.
904 /// @return An iterator to read the file. This proxy is never null.
905 /// @throws FileNotAvailableException Thrown when the file can't be read.
906 /// @throws RegistryNotExistException Thrown when the registry doesn't exist.
907 /// @throws RegistryUnreachableException Thrown when the registry is unreachable.
908 FileIterator * openRegistryStdOut(string name, int count)
910 }
911}
Describes an Ice server.
The exception that is thrown when the registry update lock cannot be acquired.
The exception that is thrown when IceGrid does not know an object adapter with the provided adapter I...
Definition Exception.ice:55
The exception that is thrown when IceGrid does not know an application with the provided name.
Definition Exception.ice:21
The exception that is thrown when an unknown signal is sent to a server.
The exception that is thrown when IceGrid cannot deploy a server.
Definition Exception.ice:90
The exception that is thrown when a log file is not available.
The exception that is thrown when IceGrid does not know a node with the provided name.
Definition Exception.ice:76
The exception that is thrown when IceGrid cannot reach a node.
Definition Exception.ice:97
The exception that is thrown when a well-known object is already registered.
Definition Exception.ice:62
The exception that is thrown when a well-known object is not registered.
Definition Exception.ice:69
The exception that is thrown when an observer is already registered with the registry.
The exception that is thrown when IceGrid does not know a registry with the provided name.
Definition Exception.ice:83
The exception that is thrown when IceGrid cannot reach a registry.
The exception that is thrown when IceGrid does not know a server with the provided server ID.
Definition Exception.ice:28
The exception that is thrown when a server failed to start.
Definition Exception.ice:35
The exception that is thrown when a server failed to stop.
Definition Exception.ice:45
Represents a session between a client application and the Glacier2 router.
Definition Session.ice:35
void adapterInit(AdapterInfoSeq adpts)
Provides the initial list of dynamically registered adapters to the observer.
void adapterRemoved(string id)
Notifies the observer that a dynamically-registered adapter was removed.
void adapterAdded(AdapterInfo info)
Notifies the observer that a dynamically-registered adapter was added.
void adapterUpdated(AdapterInfo info)
Monitors dynamically-registered object adapters.
Definition Admin.ice:722
FileIterator * openNodeStdOut(string name, int count)
Opens a node stdout file for reading.
idempotent Object * getAdminCallbackTemplate()
Gets a "template" proxy for admin callback objects.
int startUpdate()
Acquires an exclusive lock to start updating the registry applications.
FileIterator * openServerLog(string id, string path, int count)
Opens a server log file for reading.
idempotent string getReplicaName()
Gets the name of the registry replica hosting this session.
FileIterator * openRegistryStdErr(string name, int count)
Opens a registry stderr file for reading.
FileIterator * openServerStdErr(string id, int count)
Opens a server stderr file for reading.
idempotent void setObservers(RegistryObserver *registryObs, NodeObserver *nodeObs, ApplicationObserver *appObs, AdapterObserver *adptObs, ObjectObserver *objObs)
Sets the observer proxies that receive notifications when the state of the registry or nodes changes.
FileIterator * openRegistryStdOut(string name, int count)
Opens a registry stdout file for reading.
idempotent void setObserversByIdentity(Ice::Identity registryObs, Ice::Identity nodeObs, Ice::Identity appObs, Ice::Identity adptObs, Ice::Identity objObs)
Sets the observer identities that receive notifications when the state of the registry or nodes chang...
FileIterator * openNodeStdErr(string name, int count)
Opens a node stderr file for reading.
void finishUpdate()
Finishes updating the registry and releases the exclusive lock.
idempotent Admin * getAdmin()
Gets a proxy to the IceGrid admin object.
FileIterator * openServerStdOut(string id, int count)
Opens a server stdout file for reading.
Represents an administrative session between an admin tool and an IceGrid registry.
Definition Admin.ice:763
idempotent void keepAlive()
Keeps the session alive.
void removeObject(Ice::Identity id)
Removes an object from the object registry.
idempotent RegistryInfo getRegistryInfo(string name)
Gets the registry information of an IceGrid registry.
idempotent ApplicationDescriptor getDefaultApplicationDescriptor()
Gets the default application descriptor.
idempotent ObjectInfoSeq getAllObjectInfos(string expr)
Gets the object info of all the registered objects whose stringified identities match the given expre...
idempotent int getNodeProcessorSocketCount(string name)
Gets the number of physical processor sockets in the computer where an IceGrid node is deployed.
idempotent Ice::StringSeq getAllRegistryNames()
Gets the names of all the IceGrid registries currently registered.
idempotent Object * getNodeAdmin(string name)
Gets a proxy to the admin object of an IceGrid node.
idempotent string getNodeHostname(string name)
Get the hostname of a node.
idempotent Object * getServerAdmin(string id)
Gets a proxy to the admin object of a server.
idempotent Ice::StringSeq getAllServerIds()
Gets the IDs of all the servers registered with IceGrid.
void removeAdapter(string id)
Removes the adapter with the given ID.
idempotent bool isServerEnabled(string id)
Checks if the server is enabled or disabled.
idempotent void enableServer(string id, bool enabled)
Enables or disables a server.
void updateObject(Object *obj)
Updates an object in the object registry.
void updateApplication(ApplicationUpdateDescriptor descriptor)
Updates a deployed application.
idempotent bool pingNode(string name)
Pings an IceGrid node to see if it is active.
void instantiateServer(string application, string node, ServerInstanceDescriptor desc)
Instantiates a server template.
idempotent ServerState getServerState(string id)
Gets the state of a server.
idempotent bool pingRegistry(string name)
Pings an IceGrid registry to see if it is active.
void startServer(string id)
Starts a server and waits for its activation.
idempotent NodeInfo getNodeInfo(string name)
Gets the node information of a node.
void syncApplication(ApplicationDescriptor descriptor)
Synchronizes a deployed application.
void addObjectWithType(Object *obj, string type)
Adds an object to the object registry and explicitly specifies its type.
idempotent ServerInfo getServerInfo(string id)
Gets information about a server.
idempotent string getServerAdminCategory()
Gets the category for server admin objects.
void removeApplication(string name)
Removes an application from IceGrid.
idempotent ApplicationInfo getApplicationInfo(string name)
Gets an application descriptor.
idempotent ObjectInfoSeq getObjectInfosByType(string type)
Gets the object info of all the registered objects with a given type.
void addObject(Object *obj)
Adds an object to the object registry.
idempotent AdapterInfoSeq getAdapterInfo(string id)
Gets adapter information for the replica group or adapter with the given ID.
void updateApplicationWithoutRestart(ApplicationUpdateDescriptor descriptor)
Updates a deployed application.
void addApplication(ApplicationDescriptor descriptor)
Adds an application to IceGrid.
idempotent Ice::StringSeq getAllApplicationNames()
Gets all the IceGrid applications currently registered.
idempotent int getServerPid(string id)
Gets the system process ID of a server.
idempotent void shutdownRegistry(string name)
Shuts down an IceGrid registry.
void shutdownNode(string name)
Shuts down an IceGrid node.
idempotent ObjectInfo getObjectInfo(Ice::Identity id)
Gets the object info for the object.
void syncApplicationWithoutRestart(ApplicationDescriptor descriptor)
Synchronizes a deployed application.
void sendSignal(string id, string signal)
Sends a signal to a server.
void stopServer(string id)
Stops a server.
idempotent Ice::StringSeq getAllAdapterIds()
Gets the IDs of all adapters registered with IceGrid.
idempotent LoadInfo getNodeLoad(string name)
Gets the load averages of a node.
idempotent Ice::StringSeq getAllNodeNames()
Gets the names of all IceGrid nodes currently registered.
idempotent Object * getRegistryAdmin(string name)
Gets a proxy to the admin object of an IceGrid registry.
Provides administrative access to an IceGrid deployment.
Definition Admin.ice:213
void shutdown()
Shuts down the IceGrid registry.
void applicationAdded(int serial, ApplicationInfo desc)
Notifies the observer that an application was added.
void applicationUpdated(int serial, ApplicationUpdateInfo desc)
Notifies the observer that an application was updated.
void applicationInit(int serial, ApplicationInfoSeq applications)
Provides the initial application infos to the observer.
void applicationRemoved(int serial, string name)
Notifies the observer that an application was removed.
Monitors applications.
Definition Admin.ice:697
bool read(int size, out Ice::StringSeq lines)
Read lines from the log file.
Iterates over an IceGrid log file.
Definition Admin.ice:587
void destroy()
Destroys the iterator.
void updateServer(string node, ServerDynamicInfo updatedInfo)
Notifies the observer that the state of a server changed.
void nodeInit(NodeDynamicInfoSeq nodes)
Provides the initial state of the nodes to the observer.
void updateAdapter(string node, AdapterDynamicInfo updatedInfo)
Notifies the observer that the state of an object adapter changed.
void nodeUp(NodeDynamicInfo node)
Notifies the observer that a node came up.
void nodeDown(string name)
Notifies the observer that a node went down.
Monitors changes to the state of the nodes.
Definition Admin.ice:671
void objectAdded(ObjectInfo info)
Notifies the observer that a well-known object was added.
void objectUpdated(ObjectInfo info)
Notifies the observer that a well-known object was updated.
void objectInit(ObjectInfoSeq objects)
Provides the initial list of well-known objects to the observer.
void objectRemoved(Ice::Identity id)
Notifies the observer that a well-known object was removed.
Monitors well-known objects that are added, updated or removed using Admin.
Definition Admin.ice:742
void registryUp(RegistryInfo registryReplica)
Notifies the observer that a registry replica came up.
void registryInit(RegistryInfoSeq registries)
Provides the initial state of the registries to the observer.
void registryDown(string name)
Notifies the observer that a registry replica went down.
Monitors changes to the state of the registries.
Definition Admin.ice:652
Represents the main entry point into the IceGrid registry service.
Definition Registry.ice:79
sequence< NodeDynamicInfo > NodeDynamicInfoSeq
A sequence of NodeDynamicInfo.
Definition Admin.ice:667
dictionary< string, Object > StringObjectProxyDict
A dictionary of string to proxies.
Definition Admin.ice:58
sequence< AdapterDynamicInfo > AdapterDynamicInfoSeq
A sequence of AdapterDynamicInfo.
Definition Admin.ice:635
ServerState
Represents the state of a server.
Definition Admin.ice:26
@ Destroyed
The server is destroyed.
Definition Admin.ice:54
@ ActivationTimedOut
The server activation timed out.
Definition Admin.ice:38
@ Activating
The server is being activated and will change to the active state when the registered server object a...
Definition Admin.ice:34
@ Deactivating
The server is being deactivated.
Definition Admin.ice:46
@ Active
The server is running.
Definition Admin.ice:42
@ Destroying
The server is being destroyed.
Definition Admin.ice:50
@ Inactive
The server is not running.
Definition Admin.ice:29
sequence< ApplicationInfo > ApplicationInfoSeq
A sequence of ApplicationInfo.
Definition Admin.ice:193
sequence< AdapterInfo > AdapterInfoSeq
A sequence of AdapterInfo.
Definition Admin.ice:87
sequence< RegistryInfo > RegistryInfoSeq
A sequence of RegistryInfo.
Definition Admin.ice:151
sequence< ObjectInfo > ObjectInfoSeq
A sequence of ObjectInfo.
Definition Admin.ice:71
sequence< ServerDynamicInfo > ServerDynamicInfoSeq
A sequence of ServerDynamicInfo.
Definition Admin.ice:621
Deploy and manage Ice servers.
Definition Admin.ice:21
sequence< string > StringSeq
A sequence of strings.
The Ice RPC framework.
string id
The id of the adapter.
Definition Admin.ice:627
Object * proxy
The direct proxy containing the adapter endpoints. This proxy is never null.
Definition Admin.ice:630
Dynamic information about the state of an adapter.
Definition Admin.ice:625
Object * proxy
A dummy direct proxy that contains the adapter endpoints.
Definition Admin.ice:80
string id
The ID of the adapter.
Definition Admin.ice:77
string replicaGroupId
The replica group ID of the object adapter, or empty if the adapter doesn't belong to a replica group...
Definition Admin.ice:83
Information about an adapter registered with the IceGrid registry.
Definition Admin.ice:75
Describes an application.
string uuid
Unique application identifier.
Definition Admin.ice:170
long updateTime
The last update time.
Definition Admin.ice:179
ApplicationDescriptor descriptor
The application descriptor.
Definition Admin.ice:188
string createUser
The user who created the application.
Definition Admin.ice:176
string updateUser
The user who updated the application.
Definition Admin.ice:182
int revision
The application revision number.
Definition Admin.ice:185
long createTime
The creation time.
Definition Admin.ice:173
Information about an IceGrid application.
Definition Admin.ice:168
An application update descriptor to describe the updates to apply to a deployed application.
ApplicationUpdateDescriptor descriptor
The update descriptor.
Definition Admin.ice:208
string updateUser
The user who updated the application.
Definition Admin.ice:202
int revision
The application revision number.
Definition Admin.ice:205
long updateTime
The update time.
Definition Admin.ice:199
Information about updates to an IceGrid application.
Definition Admin.ice:197
float avg5
The load average over the past 5 minutes.
Definition Admin.ice:160
float avg15
The load average over the past 15 minutes.
Definition Admin.ice:163
float avg1
The load average over the past minute.
Definition Admin.ice:157
Information about the load of a node.
Definition Admin.ice:155
ServerDynamicInfoSeq servers
The dynamic information of the servers deployed on this node.
Definition Admin.ice:644
NodeInfo info
Some static information about the node.
Definition Admin.ice:641
AdapterDynamicInfoSeq adapters
The dynamic information of the adapters deployed on this node.
Definition Admin.ice:647
Dynamic information about the state of a node.
Definition Admin.ice:639
string release
The operation system release level.
Definition Admin.ice:124
string version
The operation system version.
Definition Admin.ice:127
string dataDir
The path to the node data directory.
Definition Admin.ice:137
string name
The name of the node.
Definition Admin.ice:115
int nProcessors
The number of processor threads on the node.
Definition Admin.ice:134
string hostname
The network name of the host running this node.
Definition Admin.ice:121
string os
The operating system name.
Definition Admin.ice:118
string machine
The machine hardware type.
Definition Admin.ice:130
Information about an IceGrid node.
Definition Admin.ice:113
Object * proxy
The proxy of the object.
Definition Admin.ice:64
string type
The type of the object.
Definition Admin.ice:67
Information about an Ice well-known object.
Definition Admin.ice:62
string hostname
The network name of the host running this registry.
Definition Admin.ice:147
string name
The name of the registry.
Definition Admin.ice:144
Information about an IceGrid registry replica.
Definition Admin.ice:142
bool enabled
Indicates whether the server is enabled.
Definition Admin.ice:616
ServerState state
The state of the server.
Definition Admin.ice:610
int pid
The process ID of the server.
Definition Admin.ice:613
string id
The ID of the server.
Definition Admin.ice:607
Dynamic information about the state of a server.
Definition Admin.ice:605
string node
The IceGrid node where this server is deployed.
Definition Admin.ice:102
string uuid
The application UUID.
Definition Admin.ice:96
int revision
The application revision.
Definition Admin.ice:99
ServerDescriptor descriptor
The server descriptor.
Definition Admin.ice:105
string sessionId
The ID of the session which allocated the server.
Definition Admin.ice:108
string application
The application to which this server belongs.
Definition Admin.ice:93
Information about a server managed by an IceGrid node.
Definition Admin.ice:91
Describes a template instantiation that creates a server.
Represents the identity of an Ice object.
Definition Identity.ice:26