-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
IgniteConfiguration.java
3179 lines (2811 loc) · 109 KB
/
IgniteConfiguration.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.configuration;
import org.apache.ignite.*;
import org.apache.ignite.client.ssl.*;
import org.apache.ignite.events.*;
import org.apache.ignite.internal.processors.hadoop.*;
import org.apache.ignite.internal.managers.eventstorage.*;
import org.apache.ignite.internal.util.typedef.internal.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.lifecycle.*;
import org.apache.ignite.services.*;
import org.apache.ignite.marshaller.*;
import org.apache.ignite.plugin.*;
import org.apache.ignite.portables.*;
import org.apache.ignite.spi.authentication.*;
import org.apache.ignite.spi.indexing.*;
import org.apache.ignite.streamer.*;
import org.apache.ignite.plugin.security.*;
import org.apache.ignite.plugin.segmentation.*;
import org.apache.ignite.spi.checkpoint.*;
import org.apache.ignite.spi.collision.*;
import org.apache.ignite.spi.communication.*;
import org.apache.ignite.spi.deployment.*;
import org.apache.ignite.spi.discovery.*;
import org.apache.ignite.spi.eventstorage.*;
import org.apache.ignite.spi.failover.*;
import org.apache.ignite.spi.loadbalancing.*;
import org.apache.ignite.spi.securesession.*;
import org.apache.ignite.spi.swapspace.*;
import javax.management.*;
import java.lang.management.*;
import java.net.*;
import java.util.*;
import java.util.concurrent.*;
import static org.apache.ignite.plugin.segmentation.GridSegmentationPolicy.*;
/**
* This class defines grid runtime configuration. This configuration is passed to
* {@link org.apache.ignite.Ignition#start(IgniteConfiguration)} method. It defines all configuration
* parameters required to start a grid instance. Usually, a special
* class called "loader" will create an instance of this interface and apply
* {@link org.apache.ignite.Ignition#start(IgniteConfiguration)} method to initialize GridGain instance.
* <p>
* Note that you should only set values that differ from defaults, as grid
* will automatically pick default values for all values that are not set.
* <p>
* For more information about grid configuration and startup refer to {@link org.apache.ignite.Ignition}
* documentation.
*/
public class IgniteConfiguration {
/** Courtesy notice log category. */
public static final String COURTESY_LOGGER_NAME = "org.apache.ignite.CourtesyConfigNotice";
/**
* Default flag for peer class loading. By default the value is {@code false}
* which means that peer class loading is disabled.
*/
public static final boolean DFLT_P2P_ENABLED = false;
/** Default metrics history size (value is {@code 10000}). */
public static final int DFLT_METRICS_HISTORY_SIZE = 10000;
/** Default metrics update frequency. */
public static final long DFLT_METRICS_UPDATE_FREQ = 2000;
/**
* Default metrics expire time. The value is {@link Long#MAX_VALUE} which
* means that metrics never expire.
*/
public static final long DFLT_METRICS_EXPIRE_TIME = Long.MAX_VALUE;
/** Default maximum timeout to wait for network responses in milliseconds (value is {@code 5,000ms}). */
public static final long DFLT_NETWORK_TIMEOUT = 5000;
/** Default interval between message send retries. */
public static final long DFLT_SEND_RETRY_DELAY = 1000;
/** Default message send retries count. */
public static final int DFLT_SEND_RETRY_CNT = 3;
/** Default number of clock sync samples. */
public static final int DFLT_CLOCK_SYNC_SAMPLES = 8;
/** Default clock synchronization frequency. */
public static final int DFLT_CLOCK_SYNC_FREQUENCY = 120000;
/** Default discovery startup delay in milliseconds (value is {@code 60,000ms}). */
public static final long DFLT_DISCOVERY_STARTUP_DELAY = 60000;
/** Default deployment mode (value is {@link DeploymentMode#SHARED}). */
public static final DeploymentMode DFLT_DEPLOYMENT_MODE = DeploymentMode.SHARED;
/** Default cache size for missed resources. */
public static final int DFLT_P2P_MISSED_RESOURCES_CACHE_SIZE = 100;
/** Default SMTP port. */
public static final int DFLT_SMTP_PORT = 25;
/** Default SSL enabled flag. */
public static final boolean DFLT_SMTP_SSL = false;
/** Default STARTTLS enabled flag. */
public static final boolean DFLT_SMTP_STARTTLS = false;
/** Default FROM email address. */
public static final String DFLT_SMTP_FROM_EMAIL = "info@gridgain.com";
/** Default time server port base. */
public static final int DFLT_TIME_SERVER_PORT_BASE = 31100;
/** Default time server port range. */
public static final int DFLT_TIME_SERVER_PORT_RANGE = 100;
/** Default core size of public thread pool. */
public static final int DFLT_PUBLIC_CORE_THREAD_CNT = Math.max(8, Runtime.getRuntime().availableProcessors()) * 2;
/** Default max size of public thread pool. */
public static final int DFLT_PUBLIC_MAX_THREAD_CNT = DFLT_PUBLIC_CORE_THREAD_CNT;
/** Default keep alive time for public thread pool. */
public static final long DFLT_PUBLIC_KEEP_ALIVE_TIME = 0;
/** Default max queue capacity of public thread pool. */
public static final int DFLT_PUBLIC_THREADPOOL_QUEUE_CAP = Integer.MAX_VALUE;
/** Default size of system thread pool. */
public static final int DFLT_SYSTEM_CORE_THREAD_CNT = DFLT_PUBLIC_CORE_THREAD_CNT;
/** Default max size of system thread pool. */
public static final int DFLT_SYSTEM_MAX_THREAD_CNT = DFLT_PUBLIC_CORE_THREAD_CNT;
/** Default keep alive time for system thread pool. */
public static final long DFLT_SYSTEM_KEEP_ALIVE_TIME = 0;
/** Default max queue capacity of system thread pool. */
public static final int DFLT_SYSTEM_THREADPOOL_QUEUE_CAP = Integer.MAX_VALUE;
/** Default size of peer class loading thread pool. */
public static final int DFLT_P2P_THREAD_CNT = 2;
/** Default size of management thread pool. */
public static final int DFLT_MGMT_THREAD_CNT = 4;
/** Default size of REST thread pool. */
public static final int DFLT_REST_CORE_THREAD_CNT = DFLT_PUBLIC_CORE_THREAD_CNT;
/** Default max size of REST thread pool. */
public static final int DFLT_REST_MAX_THREAD_CNT = DFLT_PUBLIC_CORE_THREAD_CNT;
/** Default keep alive time for REST thread pool. */
public static final long DFLT_REST_KEEP_ALIVE_TIME = 0;
/** Default max queue capacity of REST thread pool. */
public static final int DFLT_REST_THREADPOOL_QUEUE_CAP = Integer.MAX_VALUE;
/** Default segmentation policy. */
public static final GridSegmentationPolicy DFLT_SEG_PLC = STOP;
/** Default value for wait for segment on startup flag. */
public static final boolean DFLT_WAIT_FOR_SEG_ON_START = true;
/** Default value for all segmentation resolvers pass required. */
public static final boolean DFLT_ALL_SEG_RESOLVERS_PASS_REQ = true;
/** Default value segmentation resolve attempts count. */
public static final int DFLT_SEG_RESOLVE_ATTEMPTS = 2;
/** Default segment check frequency in discovery manager. */
public static final long DFLT_SEG_CHK_FREQ = 10000;
/** Default frequency of metrics log print out. */
public static final long DFLT_METRICS_LOG_FREQ = 60000;
/** Default TCP server port. */
public static final int DFLT_TCP_PORT = 11211;
/** Default TCP_NODELAY flag. */
public static final boolean DFLT_TCP_NODELAY = true;
/** Default TCP direct buffer flag. */
public static final boolean DFLT_REST_TCP_DIRECT_BUF = false;
/** Default REST idle timeout. */
public static final int DFLT_REST_IDLE_TIMEOUT = 7000;
/** Default rest port range. */
public static final int DFLT_REST_PORT_RANGE = 100;
/** Default marshal local jobs flag. */
public static final boolean DFLT_MARSHAL_LOCAL_JOBS = false;
/** Default value for cache sanity check enabled flag. */
public static final boolean DFLT_CACHE_SANITY_CHECK_ENABLED = true;
/** Optional grid name. */
private String gridName;
/** User attributes. */
private Map<String, ?> userAttrs;
/** Logger. */
private IgniteLogger log;
/** Executor service. */
private ExecutorService execSvc;
/** Executor service. */
private ExecutorService sysSvc;
/** Management executor service. */
private ExecutorService mgmtSvc;
/** GGFS executor service. */
private ExecutorService ggfsSvc;
/** REST requests executor service. */
private ExecutorService restExecSvc;
/** Peer class loading executor service shutdown flag. */
private boolean p2pSvcShutdown = true;
/** Executor service shutdown flag. */
private boolean execSvcShutdown = true;
/** System executor service shutdown flag. */
private boolean sysSvcShutdown = true;
/** Management executor service shutdown flag. */
private boolean mgmtSvcShutdown = true;
/** GGFS executor service shutdown flag. */
private boolean ggfsSvcShutdown = true;
/** REST executor service shutdown flag. */
private boolean restSvcShutdown = true;
/** Lifecycle email notification. */
private boolean lifeCycleEmailNtf = true;
/** Executor service. */
private ExecutorService p2pSvc;
/** Gridgain installation folder. */
private String ggHome;
/** Gridgain work folder. */
private String ggWork;
/** MBean server. */
private MBeanServer mbeanSrv;
/** Local node ID. */
private UUID nodeId;
/** Marshaller. */
private IgniteMarshaller marsh;
/** Marshal local jobs. */
private boolean marshLocJobs = DFLT_MARSHAL_LOCAL_JOBS;
/** Daemon flag. */
private boolean daemon;
/** Jetty XML configuration path. */
private String jettyPath;
/** {@code REST} flag. */
private boolean restEnabled = true;
/** Whether or not peer class loading is enabled. */
private boolean p2pEnabled = DFLT_P2P_ENABLED;
/** List of package prefixes from the system class path that should be P2P loaded. */
private String[] p2pLocClsPathExcl;
/** Events of these types should be recorded. */
private int[] inclEvtTypes;
/** Maximum network requests timeout. */
private long netTimeout = DFLT_NETWORK_TIMEOUT;
/** Interval between message send retries. */
private long sndRetryDelay = DFLT_SEND_RETRY_DELAY;
/** Message send retries delay. */
private int sndRetryCnt = DFLT_SEND_RETRY_CNT;
/** Number of samples for clock synchronization. */
private int clockSyncSamples = DFLT_CLOCK_SYNC_SAMPLES;
/** Clock synchronization frequency. */
private long clockSyncFreq = DFLT_CLOCK_SYNC_FREQUENCY;
/** Metrics history time. */
private int metricsHistSize = DFLT_METRICS_HISTORY_SIZE;
/** Full metrics enabled flag. */
private long metricsUpdateFreq = DFLT_METRICS_UPDATE_FREQ;
/** Metrics expire time. */
private long metricsExpTime = DFLT_METRICS_EXPIRE_TIME;
/** Collection of life-cycle beans. */
private LifecycleBean[] lifecycleBeans;
/** Discovery SPI. */
private DiscoverySpi discoSpi;
/** Segmentation policy. */
private GridSegmentationPolicy segPlc = DFLT_SEG_PLC;
/** Segmentation resolvers. */
private GridSegmentationResolver[] segResolvers;
/** Segmentation resolve attempts count. */
private int segResolveAttempts = DFLT_SEG_RESOLVE_ATTEMPTS;
/** Wait for segment on startup flag. */
private boolean waitForSegOnStart = DFLT_WAIT_FOR_SEG_ON_START;
/** All segmentation resolvers pass required flag. */
private boolean allResolversPassReq = DFLT_ALL_SEG_RESOLVERS_PASS_REQ;
/** Segment check frequency. */
private long segChkFreq = DFLT_SEG_CHK_FREQ;
/** Communication SPI. */
private CommunicationSpi commSpi;
/** Event storage SPI. */
private EventStorageSpi evtSpi;
/** Collision SPI. */
private CollisionSpi colSpi;
/** Authentication SPI. */
private AuthenticationSpi authSpi;
/** Secure session SPI. */
private SecureSessionSpi sesSpi;
/** Deployment SPI. */
private DeploymentSpi deploySpi;
/** Checkpoint SPI. */
private CheckpointSpi[] cpSpi;
/** Failover SPI. */
private FailoverSpi[] failSpi;
/** Load balancing SPI. */
private LoadBalancingSpi[] loadBalancingSpi;
/** Checkpoint SPI. */
private SwapSpaceSpi swapSpaceSpi;
/** Indexing SPI. */
private GridIndexingSpi indexingSpi;
/** Address resolver. */
private AddressResolver addrRslvr;
/** Cache configurations. */
private CacheConfiguration[] cacheCfg;
/** Transactions configuration. */
private TransactionConfiguration txCfg = new TransactionConfiguration();
/** */
private Collection<? extends PluginConfiguration> pluginCfgs;
/** Flag indicating whether cache sanity check is enabled. */
private boolean cacheSanityCheckEnabled = DFLT_CACHE_SANITY_CHECK_ENABLED;
/** Discovery startup delay. */
private long discoStartupDelay = DFLT_DISCOVERY_STARTUP_DELAY;
/** Tasks classes sharing mode. */
private DeploymentMode deployMode = DFLT_DEPLOYMENT_MODE;
/** Cache size of missed resources. */
private int p2pMissedCacheSize = DFLT_P2P_MISSED_RESOURCES_CACHE_SIZE;
/** */
private String smtpHost;
/** */
private int smtpPort = DFLT_SMTP_PORT;
/** */
private String smtpUsername;
/** */
private String smtpPwd;
/** */
private String[] adminEmails;
/** */
private String smtpFromEmail = DFLT_SMTP_FROM_EMAIL;
/** */
private boolean smtpSsl = DFLT_SMTP_SSL;
/** */
private boolean smtpStartTls = DFLT_SMTP_STARTTLS;
/** Local host. */
private String locHost;
/** Base port number for time server. */
private int timeSrvPortBase = DFLT_TIME_SERVER_PORT_BASE;
/** Port number range for time server. */
private int timeSrvPortRange = DFLT_TIME_SERVER_PORT_RANGE;
/** REST secret key. */
private String restSecretKey;
/** Property names to include into node attributes. */
private String[] includeProps;
/** License custom URL. */
private String licUrl;
/** Frequency of metrics log print out. */
@SuppressWarnings("RedundantFieldInitialization")
private long metricsLogFreq = DFLT_METRICS_LOG_FREQ;
/** Local event listeners. */
private Map<IgnitePredicate<? extends IgniteEvent>, int[]> lsnrs;
/** TCP host. */
private String restTcpHost;
/** TCP port. */
private int restTcpPort = DFLT_TCP_PORT;
/** TCP no delay flag. */
private boolean restTcpNoDelay = DFLT_TCP_NODELAY;
/** REST TCP direct buffer flag. */
private boolean restTcpDirectBuf = DFLT_REST_TCP_DIRECT_BUF;
/** REST TCP send buffer size. */
private int restTcpSndBufSize;
/** REST TCP receive buffer size. */
private int restTcpRcvBufSize;
/** REST TCP send queue limit. */
private int restTcpSndQueueLimit;
/** REST TCP selector count. */
private int restTcpSelectorCnt = Math.min(4, Runtime.getRuntime().availableProcessors());
/** Idle timeout. */
private long restIdleTimeout = DFLT_REST_IDLE_TIMEOUT;
/** SSL enable flag, default is disabled. */
private boolean restTcpSslEnabled;
/** SSL need client auth flag. */
private boolean restTcpSslClientAuth;
/** SSL context factory for rest binary server. */
private GridSslContextFactory restTcpSslCtxFactory;
/** Port range */
private int restPortRange = DFLT_REST_PORT_RANGE;
/** Folders accessible by REST. */
private String[] restAccessibleFolders;
/** GGFS configuration. */
private IgniteFsConfiguration[] ggfsCfg;
/** Client message interceptor. */
private ClientMessageInterceptor clientMsgInterceptor;
/** Streamer configuration. */
private StreamerConfiguration[] streamerCfg;
/** Security credentials. */
private GridSecurityCredentialsProvider securityCred;
/** Service configuration. */
private ServiceConfiguration[] svcCfgs;
/** Hadoop configuration. */
private GridHadoopConfiguration hadoopCfg;
/** Client access configuration. */
private ClientConnectionConfiguration clientCfg;
/** Portable configuration. */
private PortableConfiguration portableCfg;
/** Warmup closure. Will be invoked before actual grid start. */
private IgniteInClosure<IgniteConfiguration> warmupClos;
/** */
private QueryConfiguration qryCfg;
/** */
private AtomicConfiguration atomicCfg = new AtomicConfiguration();
/**
* Creates valid grid configuration with all default values.
*/
public IgniteConfiguration() {
// No-op.
}
/**
* Creates grid configuration by coping all configuration properties from
* given configuration.
*
* @param cfg Grid configuration to copy from.
*/
@SuppressWarnings("deprecation")
public IgniteConfiguration(IgniteConfiguration cfg) {
assert cfg != null;
// SPIs.
discoSpi = cfg.getDiscoverySpi();
commSpi = cfg.getCommunicationSpi();
deploySpi = cfg.getDeploymentSpi();
evtSpi = cfg.getEventStorageSpi();
cpSpi = cfg.getCheckpointSpi();
colSpi = cfg.getCollisionSpi();
failSpi = cfg.getFailoverSpi();
authSpi = cfg.getAuthenticationSpi();
sesSpi = cfg.getSecureSessionSpi();
loadBalancingSpi = cfg.getLoadBalancingSpi();
swapSpaceSpi = cfg.getSwapSpaceSpi();
indexingSpi = cfg.getIndexingSpi();
/*
* Order alphabetically for maintenance purposes.
*/
addrRslvr = cfg.getAddressResolver();
adminEmails = cfg.getAdminEmails();
allResolversPassReq = cfg.isAllSegmentationResolversPassRequired();
atomicCfg = cfg.getAtomicConfiguration();
daemon = cfg.isDaemon();
cacheCfg = cfg.getCacheConfiguration();
cacheSanityCheckEnabled = cfg.isCacheSanityCheckEnabled();
clientCfg = cfg.getClientConnectionConfiguration();
clientMsgInterceptor = cfg.getClientMessageInterceptor();
clockSyncFreq = cfg.getClockSyncFrequency();
clockSyncSamples = cfg.getClockSyncSamples();
deployMode = cfg.getDeploymentMode();
discoStartupDelay = cfg.getDiscoveryStartupDelay();
execSvc = cfg.getExecutorService();
execSvcShutdown = cfg.getExecutorServiceShutdown();
ggHome = cfg.getGridGainHome();
ggWork = cfg.getWorkDirectory();
gridName = cfg.getGridName();
ggfsCfg = cfg.getGgfsConfiguration();
ggfsSvc = cfg.getGgfsExecutorService();
ggfsSvcShutdown = cfg.getGgfsExecutorServiceShutdown();
hadoopCfg = cfg.getHadoopConfiguration();
inclEvtTypes = cfg.getIncludeEventTypes();
includeProps = cfg.getIncludeProperties();
jettyPath = cfg.getRestJettyPath();
licUrl = cfg.getLicenseUrl();
lifecycleBeans = cfg.getLifecycleBeans();
lifeCycleEmailNtf = cfg.isLifeCycleEmailNotification();
locHost = cfg.getLocalHost();
log = cfg.getGridLogger();
lsnrs = cfg.getLocalEventListeners();
marsh = cfg.getMarshaller();
marshLocJobs = cfg.isMarshalLocalJobs();
mbeanSrv = cfg.getMBeanServer();
metricsHistSize = cfg.getMetricsHistorySize();
metricsExpTime = cfg.getMetricsExpireTime();
metricsLogFreq = cfg.getMetricsLogFrequency();
metricsUpdateFreq = cfg.getMetricsUpdateFrequency();
mgmtSvc = cfg.getManagementExecutorService();
mgmtSvcShutdown = cfg.getManagementExecutorServiceShutdown();
netTimeout = cfg.getNetworkTimeout();
nodeId = cfg.getNodeId();
p2pEnabled = cfg.isPeerClassLoadingEnabled();
p2pLocClsPathExcl = cfg.getPeerClassLoadingLocalClassPathExclude();
p2pMissedCacheSize = cfg.getPeerClassLoadingMissedResourcesCacheSize();
p2pSvc = cfg.getPeerClassLoadingExecutorService();
p2pSvcShutdown = cfg.getPeerClassLoadingExecutorServiceShutdown();
pluginCfgs = cfg.getPluginConfigurations();
portableCfg = cfg.getPortableConfiguration();
qryCfg = cfg.getQueryConfiguration();
restAccessibleFolders = cfg.getRestAccessibleFolders();
restEnabled = cfg.isRestEnabled();
restIdleTimeout = cfg.getRestIdleTimeout();
restPortRange = cfg.getRestPortRange();
restSecretKey = cfg.getRestSecretKey();
restTcpHost = cfg.getRestTcpHost();
restTcpNoDelay = cfg.isRestTcpNoDelay();
restTcpDirectBuf = cfg.isRestTcpDirectBuffer();
restTcpSndBufSize = cfg.getRestTcpSendBufferSize();
restTcpRcvBufSize = cfg.getRestTcpReceiveBufferSize();
restTcpSndQueueLimit = cfg.getRestTcpSendQueueLimit();
restTcpSelectorCnt = cfg.getRestTcpSelectorCount();
restTcpPort = cfg.getRestTcpPort();
restTcpSslCtxFactory = cfg.getRestTcpSslContextFactory();
restTcpSslEnabled = cfg.isRestTcpSslEnabled();
restTcpSslClientAuth = cfg.isRestTcpSslClientAuth();
restExecSvc = cfg.getRestExecutorService();
restSvcShutdown = cfg.getRestExecutorServiceShutdown();
securityCred = cfg.getSecurityCredentialsProvider();
segChkFreq = cfg.getSegmentCheckFrequency();
segPlc = cfg.getSegmentationPolicy();
segResolveAttempts = cfg.getSegmentationResolveAttempts();
segResolvers = cfg.getSegmentationResolvers();
sndRetryCnt = cfg.getNetworkSendRetryCount();
sndRetryDelay = cfg.getNetworkSendRetryDelay();
smtpHost = cfg.getSmtpHost();
smtpPort = cfg.getSmtpPort();
smtpUsername = cfg.getSmtpUsername();
smtpPwd = cfg.getSmtpPassword();
smtpFromEmail = cfg.getSmtpFromEmail();
smtpSsl = cfg.isSmtpSsl();
smtpStartTls = cfg.isSmtpStartTls();
streamerCfg = cfg.getStreamerConfiguration();
sysSvc = cfg.getSystemExecutorService();
sysSvcShutdown = cfg.getSystemExecutorServiceShutdown();
timeSrvPortBase = cfg.getTimeServerPortBase();
timeSrvPortRange = cfg.getTimeServerPortRange();
txCfg = cfg.getTransactionsConfiguration();
userAttrs = cfg.getUserAttributes();
waitForSegOnStart = cfg.isWaitForSegmentOnStart();
warmupClos = cfg.getWarmupClosure();
}
/**
* Whether or not send email notifications on node start and stop. Note if enabled
* email notifications will only be sent if SMTP is configured and at least one
* admin email is provided.
* <p>
* By default - email notifications are enabled.
*
* @return {@code True} to enable lifecycle email notifications.
* @see #getSmtpHost()
* @see #getAdminEmails()
*/
public boolean isLifeCycleEmailNotification() {
return lifeCycleEmailNtf;
}
/**
* Gets custom license file URL to be used instead of default license file location.
*
* @return Custom license file URL or {@code null} to use the default
* {@code $IGNITE_HOME}-related location.
*/
public String getLicenseUrl() {
return licUrl;
}
/**
* Whether or not to use SSL fot SMTP. Default is {@link #DFLT_SMTP_SSL}.
* <p>
* Note that GridGain uses SMTP to send emails in critical
* situations such as license expiration or fatal system errors.
* It is <b>highly</b> recommended to configure SMTP in production
* environment.
* <p>
* Note that {@link #getSmtpHost()} is the only mandatory SMTP
* configuration property.
*
* @return Whether or not to use SSL fot SMTP.
* @see #DFLT_SMTP_SSL
* @see org.apache.ignite.IgniteSystemProperties#IGNITE_SMTP_SSL
*/
public boolean isSmtpSsl() {
return smtpSsl;
}
/**
* Whether or not to use STARTTLS fot SMTP. Default is {@link #DFLT_SMTP_STARTTLS}.
* <p>
* Note that GridGain uses SMTP to send emails in critical
* situations such as license expiration or fatal system errors.
* It is <b>highly</b> recommended to configure SMTP in production
* environment.
* <p>
* Note that {@link #getSmtpHost()} is the only mandatory SMTP
* configuration property.
*
* @return Whether or not to use STARTTLS fot SMTP.
* @see #DFLT_SMTP_STARTTLS
* @see org.apache.ignite.IgniteSystemProperties#IGNITE_SMTP_STARTTLS
*/
public boolean isSmtpStartTls() {
return smtpStartTls;
}
/**
* Gets SMTP host name or {@code null} if SMTP is not configured.
* <p>
* Note that GridGain uses SMTP to send emails in critical
* situations such as license expiration or fatal system errors.
* It is <b>highly</b> recommended to configure SMTP in production
* environment.
* <p>
* Note that {@code getSmtpHost()} is the only mandatory SMTP
* configuration property.
*
* @return SMTP host name or {@code null} if SMTP is not configured.
* @see org.apache.ignite.IgniteSystemProperties#IGNITE_SMTP_HOST
*/
public String getSmtpHost() {
return smtpHost;
}
/**
* Gets SMTP port. Default value is {@link #DFLT_SMTP_PORT}.
* <p>
* Note that GridGain uses SMTP to send emails in critical
* situations such as license expiration or fatal system errors.
* It is <b>highly</b> recommended to configure SMTP in production
* environment.
* <p>
* Note that {@link #getSmtpHost()} is the only mandatory SMTP
* configuration property.
*
* @return SMTP port.
* @see #DFLT_SMTP_PORT
* @see org.apache.ignite.IgniteSystemProperties#IGNITE_SMTP_PORT
*/
public int getSmtpPort() {
return smtpPort;
}
/**
* Gets SMTP username or {@code null} if not used.
* <p>
* Note that GridGain uses SMTP to send emails in critical
* situations such as license expiration or fatal system errors.
* It is <b>highly</b> recommended to configure SMTP in production
* environment.
* <p>
* Note that {@link #getSmtpHost()} is the only mandatory SMTP
* configuration property.
*
* @return SMTP username or {@code null}.
* @see org.apache.ignite.IgniteSystemProperties#IGNITE_SMTP_USERNAME
*/
public String getSmtpUsername() {
return smtpUsername;
}
/**
* SMTP password or {@code null} if not used.
* <p>
* Note that GridGain uses SMTP to send emails in critical
* situations such as license expiration or fatal system errors.
* It is <b>highly</b> recommended to configure SMTP in production
* environment.
* <p>
* Note that {@link #getSmtpHost()} is the only mandatory SMTP
* configuration property.
*
* @return SMTP password or {@code null}.
* @see org.apache.ignite.IgniteSystemProperties#IGNITE_SMTP_PWD
*/
public String getSmtpPassword() {
return smtpPwd;
}
/**
* Gets optional set of admin emails where email notifications will be set.
* <p>
* Note that GridGain uses SMTP to send emails in critical
* situations such as license expiration or fatal system errors.
* It is <b>highly</b> recommended to configure SMTP in production
* environment.
*
* @return Optional set of admin emails where email notifications will be set.
* If {@code null} - emails will be sent only to the email in the license
* if one provided.
* @see org.apache.ignite.IgniteSystemProperties#IGNITE_ADMIN_EMAILS
*/
public String[] getAdminEmails() {
return adminEmails;
}
/**
* Gets optional FROM email address for email notifications. By default
* {@link #DFLT_SMTP_FROM_EMAIL} will be used.
*
* @return Optional FROM email address for email notifications. If {@code null}
* - {@link #DFLT_SMTP_FROM_EMAIL} will be used by default.
* @see #DFLT_SMTP_FROM_EMAIL
* @see org.apache.ignite.IgniteSystemProperties#IGNITE_SMTP_FROM
*/
public String getSmtpFromEmail() {
return smtpFromEmail;
}
/**
* Sets license URL different from the default location of the license file.
*
* @param licUrl License URl to set.
*/
public void setLicenseUrl(String licUrl) {
this.licUrl = licUrl;
}
/**
* Sets whether or not to enable lifecycle email notifications.
*
* @param lifeCycleEmailNtf {@code True} to enable lifecycle email notifications.
* @see org.apache.ignite.IgniteSystemProperties#IGNITE_LIFECYCLE_EMAIL_NOTIFY
*/
public void setLifeCycleEmailNotification(boolean lifeCycleEmailNtf) {
this.lifeCycleEmailNtf = lifeCycleEmailNtf;
}
/**
* Sets whether or not SMTP uses SSL.
* <p>
* Note that GridGain uses SMTP to send emails in critical
* situations such as license expiration or fatal system errors.
* It is <b>highly</b> recommended to configure SMTP in production
* environment.
* <p>
* Note that {@link #setSmtpHost(String)} is the only mandatory SMTP
* configuration property.
*
* @param smtpSsl Whether or not SMTP uses SSL.
* @see org.apache.ignite.IgniteSystemProperties#IGNITE_SMTP_SSL
*/
public void setSmtpSsl(boolean smtpSsl) {
this.smtpSsl = smtpSsl;
}
/**
* Sets whether or not SMTP uses STARTTLS.
* <p>
* Note that GridGain uses SMTP to send emails in critical
* situations such as license expiration or fatal system errors.
* It is <b>highly</b> recommended to configure SMTP in production
* environment.
* <p>
* Note that {@link #setSmtpHost(String)} is the only mandatory SMTP
* configuration property.
*
* @param smtpStartTls Whether or not SMTP uses STARTTLS.
* @see org.apache.ignite.IgniteSystemProperties#IGNITE_SMTP_STARTTLS
*/
public void setSmtpStartTls(boolean smtpStartTls) {
this.smtpStartTls = smtpStartTls;
}
/**
* Sets SMTP host.
* <p>
* Note that GridGain uses SMTP to send emails in critical
* situations such as license expiration or fatal system errors.
* It is <b>highly</b> recommended to configure SMTP in production
* environment.
* <p>
* Note that {@code #setSmtpHost(String)} is the only mandatory SMTP
* configuration property.
*
* @param smtpHost SMTP host to set or {@code null} to disable sending emails.
* @see org.apache.ignite.IgniteSystemProperties#IGNITE_SMTP_HOST
*/
public void setSmtpHost(String smtpHost) {
this.smtpHost = smtpHost;
}
/**
* Sets SMTP port. Default value is {@link #DFLT_SMTP_PORT}.
* <p>
* Note that GridGain uses SMTP to send emails in critical
* situations such as license expiration or fatal system errors.
* It is <b>highly</b> recommended to configure SMTP in production
* environment.
* <p>
* Note that {@link #setSmtpHost(String)} is the only mandatory SMTP
* configuration property.
*
* @param smtpPort SMTP port to set.
* @see #DFLT_SMTP_PORT
* @see org.apache.ignite.IgniteSystemProperties#IGNITE_SMTP_PORT
*/
public void setSmtpPort(int smtpPort) {
this.smtpPort = smtpPort;
}
/**
* Sets SMTP username or {@code null} if not used.
* <p>
* Note that GridGain uses SMTP to send emails in critical
* situations such as license expiration or fatal system errors.
* It is <b>highly</b> recommended to configure SMTP in production
* environment.
* <p>
* Note that {@link #setSmtpHost(String)} is the only mandatory SMTP
* configuration property.
*
* @param smtpUsername SMTP username or {@code null}.
* @see org.apache.ignite.IgniteSystemProperties#IGNITE_SMTP_USERNAME
*/
public void setSmtpUsername(String smtpUsername) {
this.smtpUsername = smtpUsername;
}
/**
* Sets SMTP password or {@code null} if not used.
* <p>
* Note that GridGain uses SMTP to send emails in critical
* situations such as license expiration or fatal system errors.
* It is <b>highly</b> recommended to configure SMTP in production
* environment.
* <p>
* Note that {@link #setSmtpHost(String)} is the only mandatory SMTP
* configuration property.
*
* @param smtpPwd SMTP password or {@code null}.
* @see org.apache.ignite.IgniteSystemProperties#IGNITE_SMTP_PWD
*/
public void setSmtpPassword(String smtpPwd) {
this.smtpPwd = smtpPwd;
}
/**
* Sets optional set of admin emails where email notifications will be set.
* <p>
* Note that GridGain uses SMTP to send emails in critical
* situations such as license expiration or fatal system errors.
* It is <b>highly</b> recommended to configure SMTP in production
* environment.
*
* @param adminEmails Optional set of admin emails where email notifications will be set.
* If {@code null} - emails will be sent only to the email in the license
* if one provided.
* @see org.apache.ignite.IgniteSystemProperties#IGNITE_ADMIN_EMAILS
*/
public void setAdminEmails(String[] adminEmails) {
this.adminEmails = adminEmails;
}
/**
* Sets optional FROM email address for email notifications. By default
* {@link #DFLT_SMTP_FROM_EMAIL} will be used.
*
* @param smtpFromEmail Optional FROM email address for email notifications. If {@code null}
* - {@link #DFLT_SMTP_FROM_EMAIL} will be used by default.
* @see #DFLT_SMTP_FROM_EMAIL
* @see org.apache.ignite.IgniteSystemProperties#IGNITE_SMTP_FROM
*/
public void setSmtpFromEmail(String smtpFromEmail) {
this.smtpFromEmail = smtpFromEmail;
}
/**
* Gets optional grid name. Returns {@code null} if non-default grid name was not
* provided.
*
* @return Optional grid name. Can be {@code null}, which is default grid name, if
* non-default grid name was not provided.
*/
public String getGridName() {
return gridName;
}
/**
* Whether or not this node should be a daemon node.
* <p>
* Daemon nodes are the usual grid nodes that participate in topology but not
* visible on the main APIs, i.e. they are not part of any projections. The only
* way to see daemon nodes is to use {@link org.apache.ignite.cluster.ClusterGroup#forDaemons()} method.
* <p>
* Daemon nodes are used primarily for management and monitoring functionality that
* is build on GridGain and needs to participate in the topology but also needs to be
* excluded from "normal" topology so that it won't participate in task execution
* or in-memory data grid storage.
*