MySQL 5.6.14 Source Code Document
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
pfs_visitor.h
Go to the documentation of this file.
1
/* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
2
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
6
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
11
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software Foundation,
14
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
15
16
#ifndef PFS_VISITOR_H
17
#define PFS_VISITOR_H
18
19
#include "
pfs_stat.h
"
20
31
struct
PFS_user
;
32
struct
PFS_account
;
33
struct
PFS_host
;
34
struct
PFS_thread
;
35
struct
PFS_instr_class
;
36
struct
PFS_mutex_class
;
37
struct
PFS_rwlock_class
;
38
struct
PFS_cond_class
;
39
struct
PFS_file_class
;
40
struct
PFS_socket_class
;
41
struct
PFS_table_share
;
42
struct
PFS_mutex
;
43
struct
PFS_rwlock
;
44
struct
PFS_cond
;
45
struct
PFS_file
;
46
struct
PFS_table
;
47
struct
PFS_stage_class
;
48
struct
PFS_statement_class
;
49
struct
PFS_socket
;
50
struct
PFS_connection_slice
;
51
56
class
PFS_connection_visitor
57
{
58
public
:
59
PFS_connection_visitor
() {}
60
virtual
~
PFS_connection_visitor
() {}
62
virtual
void
visit_global
() {}
64
virtual
void
visit_host
(
PFS_host
*pfs) {}
66
virtual
void
visit_account
(
PFS_account
*pfs) {}
68
virtual
void
visit_user
(
PFS_user
*pfs) {}
70
virtual
void
visit_thread
(
PFS_thread
*pfs) {}
71
};
72
77
class
PFS_connection_iterator
78
{
79
public
:
88
static
void
visit_global
(
bool
with_hosts,
bool
with_users,
89
bool
with_accounts,
bool
with_threads,
90
PFS_connection_visitor
*visitor);
98
static
void
visit_host
(
PFS_host
*host,
bool
with_accounts,
bool
with_threads,
99
PFS_connection_visitor
*visitor);
107
static
void
visit_user
(
PFS_user
*user,
bool
with_accounts,
bool
with_threads,
108
PFS_connection_visitor
*visitor);
115
static
void
visit_account
(
PFS_account
*account,
bool
with_threads,
116
PFS_connection_visitor
*visitor);
122
static
inline
void
visit_thread
(
PFS_thread
*thread,
123
PFS_connection_visitor
*visitor)
124
{ visitor->
visit_thread
(thread); }
125
};
126
131
class
PFS_instance_visitor
132
{
133
public
:
134
PFS_instance_visitor
() {}
135
virtual
~
PFS_instance_visitor
() {}
137
virtual
void
visit_mutex_class
(
PFS_mutex_class
*pfs) {}
139
virtual
void
visit_rwlock_class
(
PFS_rwlock_class
*pfs) {}
141
virtual
void
visit_cond_class
(
PFS_cond_class
*pfs) {}
143
virtual
void
visit_file_class
(
PFS_file_class
*pfs) {}
145
virtual
void
visit_socket_class
(
PFS_socket_class
*pfs) {}
147
virtual
void
visit_mutex
(
PFS_mutex
*pfs) {}
149
virtual
void
visit_rwlock
(
PFS_rwlock
*pfs) {}
151
virtual
void
visit_cond
(
PFS_cond
*pfs) {}
153
virtual
void
visit_file
(
PFS_file
*pfs) {}
155
virtual
void
visit_socket
(
PFS_socket
*pfs) {}
156
};
157
162
class
PFS_instance_iterator
163
{
164
public
:
165
static
void
visit_all(
PFS_instance_visitor
*visitor);
166
static
void
visit_all_mutex(
PFS_instance_visitor
*visitor);
167
static
void
visit_all_mutex_classes(
PFS_instance_visitor
*visitor);
168
static
void
visit_all_mutex_instances(
PFS_instance_visitor
*visitor);
169
static
void
visit_all_rwlock(
PFS_instance_visitor
*visitor);
170
static
void
visit_all_rwlock_classes(
PFS_instance_visitor
*visitor);
171
static
void
visit_all_rwlock_instances(
PFS_instance_visitor
*visitor);
172
static
void
visit_all_cond(
PFS_instance_visitor
*visitor);
173
static
void
visit_all_cond_classes(
PFS_instance_visitor
*visitor);
174
static
void
visit_all_cond_instances(
PFS_instance_visitor
*visitor);
175
static
void
visit_all_file(
PFS_instance_visitor
*visitor);
176
static
void
visit_all_file_classes(
PFS_instance_visitor
*visitor);
177
static
void
visit_all_file_instances(
PFS_instance_visitor
*visitor);
178
184
static
void
visit_mutex_instances
(
PFS_mutex_class
*klass,
185
PFS_instance_visitor
*visitor);
191
static
void
visit_rwlock_instances
(
PFS_rwlock_class
*klass,
192
PFS_instance_visitor
*visitor);
198
static
void
visit_cond_instances
(
PFS_cond_class
*klass,
199
PFS_instance_visitor
*visitor);
205
static
void
visit_file_instances
(
PFS_file_class
*klass,
206
PFS_instance_visitor
*visitor);
212
static
void
visit_socket_instances
(
PFS_socket_class
*klass,
213
PFS_instance_visitor
*visitor);
221
static
void
visit_socket_instances
(
PFS_socket_class
*klass,
222
PFS_instance_visitor
*visitor,
223
PFS_thread
*thread,
224
bool
visit_class=
true
);
232
static
void
visit_instances
(
PFS_instr_class
*klass,
233
PFS_instance_visitor
*visitor,
234
PFS_thread
*thread,
235
bool
visit_class=
true
);
236
};
237
242
class
PFS_object_visitor
243
{
244
public
:
245
PFS_object_visitor
() {}
246
virtual
~
PFS_object_visitor
() {}
248
virtual
void
visit_global
() {}
250
virtual
void
visit_table_share
(
PFS_table_share
*pfs) {}
252
virtual
void
visit_table_share_index
(
PFS_table_share
*pfs, uint
index
) {}
254
virtual
void
visit_table
(
PFS_table
*pfs) {}
256
virtual
void
visit_table_index
(
PFS_table
*pfs, uint
index
) {}
257
};
258
263
class
PFS_object_iterator
264
{
265
public
:
267
static
void
visit_all
(
PFS_object_visitor
*visitor);
269
static
void
visit_all_tables
(
PFS_object_visitor
*visitor);
271
static
void
visit_tables
(
PFS_table_share
*share,
272
PFS_object_visitor
*visitor);
274
static
void
visit_table_indexes
(
PFS_table_share
*share,
275
uint
index
,
276
PFS_object_visitor
*visitor);
277
};
278
283
class
PFS_connection_wait_visitor
:
public
PFS_connection_visitor
284
{
285
public
:
287
PFS_connection_wait_visitor
(
PFS_instr_class
*klass);
288
virtual
~
PFS_connection_wait_visitor
();
289
virtual
void
visit_global
();
290
virtual
void
visit_host
(
PFS_host
*pfs);
291
virtual
void
visit_account
(
PFS_account
*pfs);
292
virtual
void
visit_user
(
PFS_user
*pfs);
293
virtual
void
visit_thread
(
PFS_thread
*pfs);
294
296
uint
m_index
;
298
PFS_single_stat
m_stat
;
299
};
300
305
class
PFS_connection_all_wait_visitor
:
public
PFS_connection_visitor
306
{
307
public
:
309
PFS_connection_all_wait_visitor
();
310
virtual
~
PFS_connection_all_wait_visitor
();
311
virtual
void
visit_global
();
312
virtual
void
visit_host
(
PFS_host
*pfs);
313
virtual
void
visit_account
(
PFS_account
*pfs);
314
virtual
void
visit_user
(
PFS_user
*pfs);
315
virtual
void
visit_thread
(
PFS_thread
*pfs);
316
318
PFS_single_stat
m_stat
;
319
320
private
:
321
void
visit_connection_slice(
PFS_connection_slice
*pfs);
322
};
323
328
class
PFS_connection_stage_visitor
:
public
PFS_connection_visitor
329
{
330
public
:
332
PFS_connection_stage_visitor
(
PFS_stage_class
*klass);
333
virtual
~
PFS_connection_stage_visitor
();
334
virtual
void
visit_global
();
335
virtual
void
visit_host
(
PFS_host
*pfs);
336
virtual
void
visit_account
(
PFS_account
*pfs);
337
virtual
void
visit_user
(
PFS_user
*pfs);
338
virtual
void
visit_thread
(
PFS_thread
*pfs);
339
341
uint
m_index
;
343
PFS_stage_stat
m_stat
;
344
};
345
350
class
PFS_connection_statement_visitor
:
public
PFS_connection_visitor
351
{
352
public
:
354
PFS_connection_statement_visitor
(
PFS_statement_class
*klass);
355
virtual
~
PFS_connection_statement_visitor
();
356
virtual
void
visit_global
();
357
virtual
void
visit_host
(
PFS_host
*pfs);
358
virtual
void
visit_account
(
PFS_account
*pfs);
359
virtual
void
visit_user
(
PFS_user
*pfs);
360
virtual
void
visit_thread
(
PFS_thread
*pfs);
361
363
uint
m_index
;
365
PFS_statement_stat
m_stat
;
366
};
367
372
class
PFS_connection_all_statement_visitor
:
public
PFS_connection_visitor
373
{
374
public
:
376
PFS_connection_all_statement_visitor
();
377
virtual
~
PFS_connection_all_statement_visitor
();
378
virtual
void
visit_global
();
379
virtual
void
visit_host
(
PFS_host
*pfs);
380
virtual
void
visit_account
(
PFS_account
*pfs);
381
virtual
void
visit_user
(
PFS_user
*pfs);
382
virtual
void
visit_thread
(
PFS_thread
*pfs);
383
385
PFS_statement_stat
m_stat
;
386
387
private
:
388
void
visit_connection_slice(
PFS_connection_slice
*pfs);
389
};
390
395
class
PFS_connection_stat_visitor
:
public
PFS_connection_visitor
396
{
397
public
:
399
PFS_connection_stat_visitor
();
400
virtual
~
PFS_connection_stat_visitor
();
401
virtual
void
visit_global
();
402
virtual
void
visit_host
(
PFS_host
*pfs);
403
virtual
void
visit_account
(
PFS_account
*pfs);
404
virtual
void
visit_user
(
PFS_user
*pfs);
405
virtual
void
visit_thread
(
PFS_thread
*pfs);
406
408
PFS_connection_stat
m_stat
;
409
};
410
415
class
PFS_instance_wait_visitor
:
public
PFS_instance_visitor
416
{
417
public
:
418
PFS_instance_wait_visitor
();
419
virtual
~
PFS_instance_wait_visitor
();
420
virtual
void
visit_mutex_class
(
PFS_mutex_class
*pfs);
421
virtual
void
visit_rwlock_class
(
PFS_rwlock_class
*pfs);
422
virtual
void
visit_cond_class
(
PFS_cond_class
*pfs);
423
virtual
void
visit_file_class
(
PFS_file_class
*pfs);
424
virtual
void
visit_socket_class
(
PFS_socket_class
*pfs);
425
virtual
void
visit_mutex
(
PFS_mutex
*pfs);
426
virtual
void
visit_rwlock
(
PFS_rwlock
*pfs);
427
virtual
void
visit_cond
(
PFS_cond
*pfs);
428
virtual
void
visit_file
(
PFS_file
*pfs);
429
virtual
void
visit_socket
(
PFS_socket
*pfs);
430
432
PFS_single_stat
m_stat
;
433
};
434
439
class
PFS_object_wait_visitor
:
public
PFS_object_visitor
440
{
441
public
:
442
PFS_object_wait_visitor
();
443
virtual
~
PFS_object_wait_visitor
();
444
virtual
void
visit_global
();
445
virtual
void
visit_table_share
(
PFS_table_share
*pfs);
446
virtual
void
visit_table
(
PFS_table
*pfs);
447
449
PFS_single_stat
m_stat
;
450
};
451
456
class
PFS_table_io_wait_visitor
:
public
PFS_object_visitor
457
{
458
public
:
459
PFS_table_io_wait_visitor
();
460
virtual
~
PFS_table_io_wait_visitor
();
461
virtual
void
visit_global
();
462
virtual
void
visit_table_share
(
PFS_table_share
*pfs);
463
virtual
void
visit_table
(
PFS_table
*pfs);
464
466
PFS_single_stat
m_stat
;
467
};
468
473
class
PFS_table_io_stat_visitor
:
public
PFS_object_visitor
474
{
475
public
:
476
PFS_table_io_stat_visitor
();
477
virtual
~
PFS_table_io_stat_visitor
();
478
virtual
void
visit_table_share
(
PFS_table_share
*pfs);
479
virtual
void
visit_table
(
PFS_table
*pfs);
480
482
PFS_table_io_stat
m_stat
;
483
};
484
489
class
PFS_index_io_stat_visitor
:
public
PFS_object_visitor
490
{
491
public
:
492
PFS_index_io_stat_visitor
();
493
virtual
~
PFS_index_io_stat_visitor
();
494
virtual
void
visit_table_share_index
(
PFS_table_share
*pfs, uint
index
);
495
virtual
void
visit_table_index
(
PFS_table
*pfs, uint index);
496
498
PFS_table_io_stat
m_stat
;
499
};
500
505
class
PFS_table_lock_wait_visitor
:
public
PFS_object_visitor
506
{
507
public
:
508
PFS_table_lock_wait_visitor
();
509
virtual
~
PFS_table_lock_wait_visitor
();
510
virtual
void
visit_global
();
511
virtual
void
visit_table_share
(
PFS_table_share
*pfs);
512
virtual
void
visit_table
(
PFS_table
*pfs);
513
515
PFS_single_stat
m_stat
;
516
};
517
522
class
PFS_table_lock_stat_visitor
:
public
PFS_object_visitor
523
{
524
public
:
525
PFS_table_lock_stat_visitor
();
526
virtual
~
PFS_table_lock_stat_visitor
();
527
virtual
void
visit_table_share
(
PFS_table_share
*pfs);
528
virtual
void
visit_table
(
PFS_table
*pfs);
529
531
PFS_table_lock_stat
m_stat
;
532
};
533
538
class
PFS_instance_socket_io_stat_visitor
:
public
PFS_instance_visitor
539
{
540
public
:
541
PFS_instance_socket_io_stat_visitor
();
542
virtual
~
PFS_instance_socket_io_stat_visitor
();
543
virtual
void
visit_socket_class
(
PFS_socket_class
*pfs);
544
virtual
void
visit_socket
(
PFS_socket
*pfs);
545
547
PFS_socket_io_stat
m_socket_io_stat
;
548
};
549
554
class
PFS_instance_file_io_stat_visitor
:
public
PFS_instance_visitor
555
{
556
public
:
557
PFS_instance_file_io_stat_visitor
();
558
virtual
~
PFS_instance_file_io_stat_visitor
();
559
virtual
void
visit_file_class
(
PFS_file_class
*pfs);
560
virtual
void
visit_file
(
PFS_file
*pfs);
561
563
PFS_file_io_stat
m_file_io_stat
;
564
};
565
567
#endif
568
storage
perfschema
pfs_visitor.h
Generated on Sat Nov 9 2013 01:28:40 for MySQL 5.6.14 Source Code Document by
1.8.1.2