@@ -131,6 +131,8 @@ Map<String, Function> _typeFactories = {
131
131
'Instance' : Instance .parse,
132
132
'@Isolate' : IsolateRef .parse,
133
133
'Isolate' : Isolate .parse,
134
+ '@IsolateGroup' : IsolateGroupRef .parse,
135
+ 'IsolateGroup' : IsolateGroup .parse,
134
136
'InboundReferences' : InboundReferences .parse,
135
137
'InboundReference' : InboundReference .parse,
136
138
'InstanceSet' : InstanceSet .parse,
@@ -188,7 +190,9 @@ Map<String, List<String>> _methodReturnTypes = {
188
190
'getInboundReferences' : const ['InboundReferences' , 'Sentinel' ],
189
191
'getInstances' : const ['InstanceSet' ],
190
192
'getIsolate' : const ['Isolate' , 'Sentinel' ],
193
+ 'getIsolateGroup' : const ['IsolateGroup' , 'Sentinel' ],
191
194
'getMemoryUsage' : const ['MemoryUsage' , 'Sentinel' ],
195
+ 'getIsolateGroupMemoryUsage' : const ['MemoryUsage' , 'Sentinel' ],
192
196
'getScripts' : const ['ScriptList' ],
193
197
'getObject' : const ['Obj' , 'Sentinel' ],
194
198
'getRetainingPath' : const ['RetainingPath' ],
@@ -506,6 +510,21 @@ abstract class VmServiceInterface {
506
510
/// The return value can be one of [Isolate] or [Sentinel] .
507
511
Future <dynamic > getIsolate (String isolateId);
508
512
513
+ /// The `getIsolateGroup` RPC is used to lookup an `IsolateGroup` object by
514
+ /// its `id` .
515
+ ///
516
+ /// If `isolateGroupId` refers to an isolate group which has exited, then the
517
+ /// `Expired` [Sentinel] is returned.
518
+ ///
519
+ /// `IsolateGroup` `id` is an opaque identifier that can be fetched from an
520
+ /// `IsolateGroup` . List of active `IsolateGroup` 's, for example, is available
521
+ /// on `VM` object.
522
+ ///
523
+ /// See [IsolateGroup] , [VM] .
524
+ ///
525
+ /// The return value can be one of [IsolateGroup] or [Sentinel] .
526
+ Future <dynamic > getIsolateGroup (String isolateGroupId);
527
+
509
528
/// The `getMemoryUsage` RPC is used to lookup an isolate's memory usage
510
529
/// statistics by its `id` .
511
530
///
@@ -517,6 +536,17 @@ abstract class VmServiceInterface {
517
536
/// The return value can be one of [MemoryUsage] or [Sentinel] .
518
537
Future <dynamic > getMemoryUsage (String isolateId);
519
538
539
+ /// The `getIsolateGroupMemoryUsage` RPC is used to lookup an isolate group's
540
+ /// memory usage statistics by its `id` .
541
+ ///
542
+ /// If `isolateGroupId` refers to an isolate group which has exited, then the
543
+ /// `Expired` [Sentinel] is returned.
544
+ ///
545
+ /// See [IsolateGroup] .
546
+ ///
547
+ /// The return value can be one of [MemoryUsage] or [Sentinel] .
548
+ Future <dynamic > getIsolateGroupMemoryUsage (String isolateGroupId);
549
+
520
550
/// The `getScripts` RPC is used to retrieve a `ScriptList` containing all
521
551
/// scripts for an isolate based on the isolate's `isolateId` .
522
552
///
@@ -1027,11 +1057,21 @@ class VmServerConnection {
1027
1057
params['isolateId' ],
1028
1058
);
1029
1059
break ;
1060
+ case 'getIsolateGroup' :
1061
+ response = await _serviceImplementation.getIsolateGroup (
1062
+ params['isolateGroupId' ],
1063
+ );
1064
+ break ;
1030
1065
case 'getMemoryUsage' :
1031
1066
response = await _serviceImplementation.getMemoryUsage (
1032
1067
params['isolateId' ],
1033
1068
);
1034
1069
break ;
1070
+ case 'getIsolateGroupMemoryUsage' :
1071
+ response = await _serviceImplementation.getIsolateGroupMemoryUsage (
1072
+ params['isolateGroupId' ],
1073
+ );
1074
+ break ;
1035
1075
case 'getScripts' :
1036
1076
response = await _serviceImplementation.getScripts (
1037
1077
params['isolateId' ],
@@ -1468,11 +1508,22 @@ class VmService implements VmServiceInterface {
1468
1508
return _call ('getIsolate' , {'isolateId' : isolateId});
1469
1509
}
1470
1510
1511
+ @override
1512
+ Future <dynamic > getIsolateGroup (String isolateGroupId) {
1513
+ return _call ('getIsolateGroup' , {'isolateGroupId' : isolateGroupId});
1514
+ }
1515
+
1471
1516
@override
1472
1517
Future <dynamic > getMemoryUsage (String isolateId) {
1473
1518
return _call ('getMemoryUsage' , {'isolateId' : isolateId});
1474
1519
}
1475
1520
1521
+ @override
1522
+ Future <dynamic > getIsolateGroupMemoryUsage (String isolateGroupId) {
1523
+ return _call (
1524
+ 'getIsolateGroupMemoryUsage' , {'isolateGroupId' : isolateGroupId});
1525
+ }
1526
+
1476
1527
@override
1477
1528
Future <ScriptList > getScripts (String isolateId) {
1478
1529
return _call ('getScripts' , {'isolateId' : isolateId});
@@ -1699,6 +1750,7 @@ class VmService implements VmServiceInterface {
1699
1750
void dispose () {
1700
1751
_streamSub.cancel ();
1701
1752
_completers.values.forEach ((c) => c.completeError ('disposed' ));
1753
+ _completers.clear ();
1702
1754
if (_disposeHandler != null ) {
1703
1755
_disposeHandler ();
1704
1756
}
@@ -4444,6 +4496,105 @@ class Isolate extends Response {
4444
4496
String toString () => '[Isolate]' ;
4445
4497
}
4446
4498
4499
+ /// `IsolateGroupRef` is a reference to an `IsolateGroup` object.
4500
+ class IsolateGroupRef extends Response {
4501
+ static IsolateGroupRef parse (Map <String , dynamic > json) =>
4502
+ json == null ? null : IsolateGroupRef ._fromJson (json);
4503
+
4504
+ /// The id which is passed to the getIsolateGroup RPC to load this isolate
4505
+ /// group.
4506
+ String id;
4507
+
4508
+ /// A numeric id for this isolate group, represented as a string. Unique.
4509
+ String number;
4510
+
4511
+ /// A name identifying this isolate group. Not guaranteed to be unique.
4512
+ String name;
4513
+
4514
+ IsolateGroupRef ({
4515
+ @required this .id,
4516
+ @required this .number,
4517
+ @required this .name,
4518
+ });
4519
+ IsolateGroupRef ._fromJson (Map <String , dynamic > json) : super ._fromJson (json) {
4520
+ id = json['id' ];
4521
+ number = json['number' ];
4522
+ name = json['name' ];
4523
+ }
4524
+
4525
+ @override
4526
+ Map <String , dynamic > toJson () {
4527
+ var json = < String , dynamic > {};
4528
+ json['type' ] = '@IsolateGroup' ;
4529
+ json.addAll ({
4530
+ 'id' : id,
4531
+ 'number' : number,
4532
+ 'name' : name,
4533
+ });
4534
+ return json;
4535
+ }
4536
+
4537
+ int get hashCode => id.hashCode;
4538
+
4539
+ operator == (other) => other is IsolateGroupRef && id == other.id;
4540
+
4541
+ String toString () =>
4542
+ '[IsolateGroupRef type: ${type }, id: ${id }, number: ${number }, name: ${name }]' ;
4543
+ }
4544
+
4545
+ /// An `Isolate` object provides information about one isolate in the VM.
4546
+ class IsolateGroup extends Response {
4547
+ static IsolateGroup parse (Map <String , dynamic > json) =>
4548
+ json == null ? null : IsolateGroup ._fromJson (json);
4549
+
4550
+ /// The id which is passed to the getIsolate RPC to reload this isolate.
4551
+ String id;
4552
+
4553
+ /// A numeric id for this isolate, represented as a string. Unique.
4554
+ String number;
4555
+
4556
+ /// A name identifying this isolate. Not guaranteed to be unique.
4557
+ String name;
4558
+
4559
+ /// A list of all isolates in this isolate group.
4560
+ List <IsolateRef > isolates;
4561
+
4562
+ IsolateGroup ({
4563
+ @required this .id,
4564
+ @required this .number,
4565
+ @required this .name,
4566
+ @required this .isolates,
4567
+ });
4568
+ IsolateGroup ._fromJson (Map <String , dynamic > json) : super ._fromJson (json) {
4569
+ id = json['id' ];
4570
+ number = json['number' ];
4571
+ name = json['name' ];
4572
+ isolates = List <IsolateRef >.from (
4573
+ createServiceObject (json['isolates' ], const ['IsolateRef' ]));
4574
+ }
4575
+
4576
+ @override
4577
+ Map <String , dynamic > toJson () {
4578
+ var json = < String , dynamic > {};
4579
+ json['type' ] = 'IsolateGroup' ;
4580
+ json.addAll ({
4581
+ 'id' : id,
4582
+ 'number' : number,
4583
+ 'name' : name,
4584
+ 'isolates' : isolates.map ((f) => f.toJson ()).toList (),
4585
+ });
4586
+ return json;
4587
+ }
4588
+
4589
+ int get hashCode => id.hashCode;
4590
+
4591
+ operator == (other) => other is IsolateGroup && id == other.id;
4592
+
4593
+ String toString () => '[IsolateGroup ' //
4594
+ 'type: ${type }, id: ${id }, number: ${number }, name: ${name }, ' //
4595
+ 'isolates: ${isolates }]' ;
4596
+ }
4597
+
4447
4598
/// See [getInboundReferences] .
4448
4599
class InboundReferences extends Response {
4449
4600
static InboundReferences parse (Map <String , dynamic > json) =>
@@ -6236,6 +6387,9 @@ class VM extends Response {
6236
6387
/// A list of isolates running in the VM.
6237
6388
List <IsolateRef > isolates;
6238
6389
6390
+ /// A list of isolate groups running in the VM.
6391
+ List <IsolateGroupRef > isolateGroups;
6392
+
6239
6393
VM ({
6240
6394
@required this .name,
6241
6395
@required this .architectureBits,
@@ -6246,6 +6400,7 @@ class VM extends Response {
6246
6400
@required this .pid,
6247
6401
@required this .startTime,
6248
6402
@required this .isolates,
6403
+ @required this .isolateGroups,
6249
6404
});
6250
6405
VM ._fromJson (Map <String , dynamic > json) : super ._fromJson (json) {
6251
6406
name = json['name' ];
@@ -6258,6 +6413,8 @@ class VM extends Response {
6258
6413
startTime = json['startTime' ];
6259
6414
isolates = List <IsolateRef >.from (
6260
6415
createServiceObject (json['isolates' ], const ['IsolateRef' ]));
6416
+ isolateGroups = List <IsolateGroupRef >.from (
6417
+ createServiceObject (json['isolateGroups' ], const ['IsolateGroupRef' ]));
6261
6418
}
6262
6419
6263
6420
@override
@@ -6274,6 +6431,7 @@ class VM extends Response {
6274
6431
'pid' : pid,
6275
6432
'startTime' : startTime,
6276
6433
'isolates' : isolates.map ((f) => f.toJson ()).toList (),
6434
+ 'isolateGroups' : isolateGroups.map ((f) => f.toJson ()).toList (),
6277
6435
});
6278
6436
return json;
6279
6437
}
0 commit comments