import {Ice} from 'ice'; import '../Ice/Identity'; import '../Ice/BuiltinSequences'; declare module './IceGrid.ns' { namespace IceGrid { /** * A mapping of string to string. */ type StringStringDict = Map; const StringStringDict: { /** * A mapping of string to string. */ new (entries?: ReadonlyArray<[string, string]>): StringStringDict; }; /** * Property descriptor. */ class PropertyDescriptor implements Ice.Struct { constructor(name?: string, value?: string); /** * The name of the property. */ name: string; /** * The value of the property. */ value: string; clone(): this; equals(other: this): boolean; hashCode(): number; } /** * A sequence of property descriptors. */ type PropertyDescriptorSeq = Array; /** * A property set descriptor. */ class PropertySetDescriptor implements Ice.Struct { constructor( references?: Ice.StringSeq, properties?: PropertyDescriptorSeq, ); /** * References to named property sets. */ references: Ice.StringSeq; /** * The property set properties. */ properties: PropertyDescriptorSeq; clone(): this; equals(other: this): boolean; hashCode(): number; } /** * A mapping of property set name to property set descriptor. */ type PropertySetDescriptorDict = Map; const PropertySetDescriptorDict: { /** * A mapping of property set name to property set descriptor. */ new ( entries?: ReadonlyArray<[string, PropertySetDescriptor]>, ): PropertySetDescriptorDict; }; /** * An Ice object descriptor. */ class ObjectDescriptor implements Ice.Struct { constructor(id?: Ice.Identity, type?: string, proxyOptions?: string); /** * The identity of the object. */ id: Ice.Identity; /** * The object type. */ type: string; /** * Proxy options to use with the proxy created for this Ice object. If empty, * the proxy will be created with the proxy options specified on the object * adapter or replica group. */ proxyOptions: string; clone(): this; equals(other: this): boolean; hashCode(): number; } /** * A sequence of object descriptors. */ type ObjectDescriptorSeq = Array; /** * An Ice object adapter descriptor. */ class AdapterDescriptor implements Ice.Struct { constructor( name?: string, description?: string, id?: string, replicaGroupId?: string, priority?: string, registerProcess?: boolean, serverLifetime?: boolean, objects?: ObjectDescriptorSeq, allocatables?: ObjectDescriptorSeq, ); /** * The object adapter name. */ name: string; /** * The description of this object adapter. */ description: string; /** * The object adapter id. */ id: string; /** * The replica id of this adapter. */ replicaGroupId: string; /** * The adapter priority. This is eventually used when the adapter * is member of a replica group to sort the adapter endpoints by * priority. */ priority: string; /** * Flag to specify if the object adapter will register a process object. */ registerProcess: boolean; /** * If true the lifetime of this object adapter is the same of the * server lifetime. This information is used by the IceGrid node * to figure out the server state: the server is active only if * all its "server lifetime" adapters are active. */ serverLifetime: boolean; /** * The well-known object descriptors associated with this object adapter. */ objects: ObjectDescriptorSeq; /** * The allocatable object descriptors associated with this object adapter. */ allocatables: ObjectDescriptorSeq; clone(): this; equals(other: this): boolean; hashCode(): number; } /** * A sequence of adapter descriptors. */ type AdapterDescriptorSeq = Array; /** * A Freeze database environment descriptor. */ class DbEnvDescriptor implements Ice.Struct { constructor( name?: string, description?: string, dbHome?: string, properties?: PropertyDescriptorSeq, ); /** * The name of the database environment. */ name: string; /** * The description of this database environment. */ description: string; /** * The home of the database environment (i.e., the directory where * the database files will be stored). If empty, the node will * provide a default database directory, otherwise the directory * must exist. */ dbHome: string; /** * The configuration properties of the database environment. */ properties: PropertyDescriptorSeq; clone(): this; equals(other: this): boolean; hashCode(): number; } /** * A sequence of database environment descriptors. */ type DbEnvDescriptorSeq = Array; /** * A communicator descriptor. */ class CommunicatorDescriptor extends Ice.Value { constructor( adapters?: AdapterDescriptorSeq, propertySet?: PropertySetDescriptor, dbEnvs?: DbEnvDescriptorSeq, logs?: Ice.StringSeq, description?: string, ); /** * The object adapters. */ adapters: AdapterDescriptorSeq; /** * The property set. */ propertySet: PropertySetDescriptor; /** * The database environments. */ dbEnvs: DbEnvDescriptorSeq; /** * The path of each log file. */ logs: Ice.StringSeq; /** * A description of this descriptor. */ description: string; } /** * A distribution descriptor defines an IcePatch2 server and the * directories to retrieve from the patch server. */ class DistributionDescriptor implements Ice.Struct { constructor(icepatch?: string, directories?: Ice.StringSeq); icepatch: string; directories: Ice.StringSeq; clone(): this; equals(other: this): boolean; hashCode(): number; } /** * An Ice server descriptor. */ class ServerDescriptor extends CommunicatorDescriptor { constructor( adapters?: AdapterDescriptorSeq, propertySet?: PropertySetDescriptor, dbEnvs?: DbEnvDescriptorSeq, logs?: Ice.StringSeq, description?: string, id?: string, exe?: string, iceVersion?: string, pwd?: string, options?: Ice.StringSeq, envs?: Ice.StringSeq, activation?: string, activationTimeout?: string, deactivationTimeout?: string, applicationDistrib?: boolean, distrib?: DistributionDescriptor, allocatable?: boolean, user?: string, ); /** * The server id. */ id: string; /** * The path of the server executable. */ exe: string; /** * The Ice version used by this server. This is only required if * backward compatibility with servers using old Ice versions is * needed (otherwise the registry will assume the server is using * the same Ice version). * For example "3.1.1", "3.2", "3.3.0". */ iceVersion: string; /** * The path to the server working directory. */ pwd: string; /** * The command line options to pass to the server executable. */ options: Ice.StringSeq; /** * The server environment variables. */ envs: Ice.StringSeq; /** * The server activation mode (possible values are "on-demand" or * "manual"). */ activation: string; /** * The activation timeout (an integer value representing the * number of seconds to wait for activation). */ activationTimeout: string; /** * The deactivation timeout (an integer value representing the * number of seconds to wait for deactivation). */ deactivationTimeout: string; /** * Specifies if the server depends on the application * distribution. */ applicationDistrib: boolean; /** * The distribution descriptor. */ distrib: DistributionDescriptor; /** * Specifies if the server is allocatable. */ allocatable: boolean; /** * The user account used to run the server. */ user: string; } /** * A sequence of server descriptors. */ type ServerDescriptorSeq = Array; /** * An IceBox service descriptor. */ class ServiceDescriptor extends CommunicatorDescriptor { constructor( adapters?: AdapterDescriptorSeq, propertySet?: PropertySetDescriptor, dbEnvs?: DbEnvDescriptorSeq, logs?: Ice.StringSeq, description?: string, name?: string, entry?: string, ); /** * The service name. */ name: string; /** * The entry point of the IceBox service. */ entry: string; } /** * A sequence of service descriptors. */ type ServiceDescriptorSeq = Array; /** * A server template instance descriptor. */ class ServerInstanceDescriptor implements Ice.Struct { constructor( template?: string, parameterValues?: StringStringDict, propertySet?: PropertySetDescriptor, servicePropertySets?: PropertySetDescriptorDict, ); /** * The template used by this instance. */ template: string; /** * The template parameter values. */ parameterValues: StringStringDict; /** * The property set. */ propertySet: PropertySetDescriptor; /** * The services property sets. It's only valid to set these * property sets if the template is an IceBox server template. */ servicePropertySets: PropertySetDescriptorDict; clone(): this; equals(other: this): boolean; hashCode(): number; } /** * A sequence of server instance descriptors. */ type ServerInstanceDescriptorSeq = Array; /** * A template descriptor for server or service templates. */ class TemplateDescriptor implements Ice.Struct { constructor( descriptor?: CommunicatorDescriptor | null, parameters?: Ice.StringSeq, parameterDefaults?: StringStringDict, ); /** * The template. */ descriptor: CommunicatorDescriptor | null; /** * The parameters required to instantiate the template. */ parameters: Ice.StringSeq; /** * The parameters default values. */ parameterDefaults: StringStringDict; clone(): this; equals(other: this): boolean; hashCode(): number; } /** * A mapping of template identifier to template descriptor. */ type TemplateDescriptorDict = Map; const TemplateDescriptorDict: { /** * A mapping of template identifier to template descriptor. */ new ( entries?: ReadonlyArray<[string, TemplateDescriptor]>, ): TemplateDescriptorDict; }; /** * A service template instance descriptor. */ class ServiceInstanceDescriptor implements Ice.Struct { constructor( template?: string, parameterValues?: StringStringDict, descriptor?: ServiceDescriptor | null, propertySet?: PropertySetDescriptor, ); /** * The template used by this instance. */ template: string; /** * The template parameter values. */ parameterValues: StringStringDict; /** * The service definition if the instance isn't a template * instance (i.e.: if the template attribute is empty). */ descriptor: ServiceDescriptor | null; /** * The property set. */ propertySet: PropertySetDescriptor; clone(): this; equals(other: this): boolean; hashCode(): number; } /** * A sequence of service instance descriptors. */ type ServiceInstanceDescriptorSeq = Array; /** * An IceBox server descriptor. */ class IceBoxDescriptor extends ServerDescriptor { constructor( adapters?: AdapterDescriptorSeq, propertySet?: PropertySetDescriptor, dbEnvs?: DbEnvDescriptorSeq, logs?: Ice.StringSeq, description?: string, id?: string, exe?: string, iceVersion?: string, pwd?: string, options?: Ice.StringSeq, envs?: Ice.StringSeq, activation?: string, activationTimeout?: string, deactivationTimeout?: string, applicationDistrib?: boolean, distrib?: DistributionDescriptor, allocatable?: boolean, user?: string, services?: ServiceInstanceDescriptorSeq, ); /** * The service instances. */ services: ServiceInstanceDescriptorSeq; } /** * A node descriptor. */ class NodeDescriptor implements Ice.Struct { constructor( variables?: StringStringDict, serverInstances?: ServerInstanceDescriptorSeq, servers?: ServerDescriptorSeq, loadFactor?: string, description?: string, propertySets?: PropertySetDescriptorDict, ); /** * The variables defined for the node. */ variables: StringStringDict; /** * The server instances. */ serverInstances: ServerInstanceDescriptorSeq; /** * Servers (which are not template instances). */ servers: ServerDescriptorSeq; /** * Load factor of the node. */ loadFactor: string; /** * The description of this node. */ description: string; /** * Property set descriptors. */ propertySets: PropertySetDescriptorDict; clone(): this; equals(other: this): boolean; hashCode(): number; } /** * Mapping of node name to node descriptor. */ type NodeDescriptorDict = Map; const NodeDescriptorDict: { /** * Mapping of node name to node descriptor. */ new ( entries?: ReadonlyArray<[string, NodeDescriptor]>, ): NodeDescriptorDict; }; /** * A base class for load balancing policies. */ class LoadBalancingPolicy extends Ice.Value { constructor(nReplicas?: string); /** * The number of replicas that will be used to gather the * endpoints of a replica group. */ nReplicas: string; } /** * Random load balancing policy. */ class RandomLoadBalancingPolicy extends LoadBalancingPolicy {} /** * Ordered load balancing policy. */ class OrderedLoadBalancingPolicy extends LoadBalancingPolicy {} /** * Round robin load balancing policy. */ class RoundRobinLoadBalancingPolicy extends LoadBalancingPolicy {} /** * Adaptive load balancing policy. */ class AdaptiveLoadBalancingPolicy extends LoadBalancingPolicy { constructor(nReplicas?: string, loadSample?: string); /** * The load sample to use for the load balancing. The allowed * values for this attribute are "1", "5" and "15", representing * respectively the load average over the past minute, the past 5 * minutes and the past 15 minutes. */ loadSample: string; } /** * A replica group descriptor. */ class ReplicaGroupDescriptor implements Ice.Struct { constructor( id?: string, loadBalancing?: LoadBalancingPolicy | null, proxyOptions?: string, objects?: ObjectDescriptorSeq, description?: string, filter?: string, ); /** * The id of the replica group. */ id: string; /** * The load balancing policy. */ loadBalancing: LoadBalancingPolicy | null; /** * Default options for proxies created for the replica group. */ proxyOptions: string; /** * The object descriptors associated with this object adapter. */ objects: ObjectDescriptorSeq; /** * The description of this replica group. */ description: string; /** * The filter to use for this replica group. */ filter: string; clone(): this; equals(other: this): boolean; hashCode(): number; } /** * A sequence of replica groups. */ type ReplicaGroupDescriptorSeq = Array; /** * An application descriptor. */ class ApplicationDescriptor implements Ice.Struct { constructor( name?: string, variables?: StringStringDict, replicaGroups?: ReplicaGroupDescriptorSeq, serverTemplates?: TemplateDescriptorDict, serviceTemplates?: TemplateDescriptorDict, nodes?: NodeDescriptorDict, distrib?: DistributionDescriptor, description?: string, propertySets?: PropertySetDescriptorDict, ); /** * The application name. */ name: string; /** * The variables defined in the application descriptor. */ variables: StringStringDict; /** * The replica groups. */ replicaGroups: ReplicaGroupDescriptorSeq; /** * The server templates. */ serverTemplates: TemplateDescriptorDict; /** * The service templates. */ serviceTemplates: TemplateDescriptorDict; /** * The application nodes. */ nodes: NodeDescriptorDict; /** * The application distribution. */ distrib: DistributionDescriptor; /** * The description of this application. */ description: string; /** * Property set descriptors. */ propertySets: PropertySetDescriptorDict; clone(): this; equals(other: this): boolean; hashCode(): number; } /** * A sequence of application descriptors. */ type ApplicationDescriptorSeq = Array; /** * A "boxed" string. */ class BoxedString extends Ice.Value { constructor(value?: string); value: string; } /** * A node update descriptor to describe the updates to apply to a * node of a deployed application. */ class NodeUpdateDescriptor implements Ice.Struct { constructor( name?: string, description?: BoxedString | null, variables?: StringStringDict, removeVariables?: Ice.StringSeq, propertySets?: PropertySetDescriptorDict, removePropertySets?: Ice.StringSeq, serverInstances?: ServerInstanceDescriptorSeq, servers?: ServerDescriptorSeq, removeServers?: Ice.StringSeq, loadFactor?: BoxedString | null, ); /** * The name of the node to update. */ name: string; /** * The updated description (or null if the description wasn't * updated.) */ description: BoxedString | null; /** * The variables to update. */ variables: StringStringDict; /** * The variables to remove. */ removeVariables: Ice.StringSeq; /** * The property sets to update. */ propertySets: PropertySetDescriptorDict; /** * The property sets to remove. */ removePropertySets: Ice.StringSeq; /** * The server instances to update. */ serverInstances: ServerInstanceDescriptorSeq; /** * The servers which are not template instances to update. */ servers: ServerDescriptorSeq; /** * The ids of the servers to remove. */ removeServers: Ice.StringSeq; /** * The updated load factor of the node (or null if the load factor * was not updated). */ loadFactor: BoxedString | null; clone(): this; equals(other: this): boolean; hashCode(): number; } /** * A sequence of node update descriptors. */ type NodeUpdateDescriptorSeq = Array; /** * A "boxed" distribution descriptor. */ class BoxedDistributionDescriptor extends Ice.Value { constructor(value?: DistributionDescriptor); value: DistributionDescriptor; } /** * An application update descriptor to describe the updates to apply * to a deployed application. */ class ApplicationUpdateDescriptor implements Ice.Struct { constructor( name?: string, description?: BoxedString | null, distrib?: BoxedDistributionDescriptor | null, variables?: StringStringDict, removeVariables?: Ice.StringSeq, propertySets?: PropertySetDescriptorDict, removePropertySets?: Ice.StringSeq, replicaGroups?: ReplicaGroupDescriptorSeq, removeReplicaGroups?: Ice.StringSeq, serverTemplates?: TemplateDescriptorDict, removeServerTemplates?: Ice.StringSeq, serviceTemplates?: TemplateDescriptorDict, removeServiceTemplates?: Ice.StringSeq, nodes?: NodeUpdateDescriptorSeq, removeNodes?: Ice.StringSeq, ); /** * The name of the application to update. */ name: string; /** * The updated description (or null if the description wasn't * updated.) */ description: BoxedString | null; /** * The updated distribution application descriptor. */ distrib: BoxedDistributionDescriptor | null; /** * The variables to update. */ variables: StringStringDict; /** * The variables to remove. */ removeVariables: Ice.StringSeq; /** * The property sets to update. */ propertySets: PropertySetDescriptorDict; /** * The property sets to remove. */ removePropertySets: Ice.StringSeq; /** * The replica groups to update. */ replicaGroups: ReplicaGroupDescriptorSeq; /** * The replica groups to remove. */ removeReplicaGroups: Ice.StringSeq; /** * The server templates to update. */ serverTemplates: TemplateDescriptorDict; /** * The ids of the server template to remove. */ removeServerTemplates: Ice.StringSeq; /** * The service templates to update. */ serviceTemplates: TemplateDescriptorDict; /** * The ids of the service template to remove. */ removeServiceTemplates: Ice.StringSeq; /** * The application nodes to update. */ nodes: NodeUpdateDescriptorSeq; /** * The nodes to remove. */ removeNodes: Ice.StringSeq; clone(): this; equals(other: this): boolean; hashCode(): number; } } } export {IceGrid} from './IceGrid.ns';