Get or create the singleton instance of the manager, loading all the
plugins enabled in the given TSDB's {@link Config}.
@return the shared instance of {@link RpcManager}. It's okay to
hold this reference once obtained.
192033
public static synchronized RpcManager instance(final TSDB tsdb) {
    final RpcManager existing = INSTANCE.get();
    if (existing != null) {
      return existing;
    }

    final RpcManager manager = new RpcManager(tsdb);
    
    // Load any plugins that are enabled via Config.  Fail if any plugin cannot be loaded.

    final ImmutableList.Builder<RpcPlugin> rpcBuilder = ImmutableList.builder();
    if (tsdb.getConfig().hasProperty("tsd.rpc.plugins")) {
      final String[] plugins = tsdb.getConfig().getString("tsd.rpc.plugins").split(",");
      manager.initializeRpcPlugins(plugins, rpcBuilder);
    }
    manager.rpc_plugins = rpcBuilder.build();

    final ImmutableMap.Builder<String, TelnetRpc> telnetBuilder = ImmutableMap.builder();
    final ImmutableMap.Builder<String, HttpRpc> httpBuilder = ImmutableMap.builder();
    manager.initializeBuiltinRpcs(tsdb.getMode(), telnetBuilder, httpBuilder);
    manager.telnet_commands = telnetBuilder.build();
    manager.http_commands = httpBuilder.build();

    final ImmutableMap.Builder<String, HttpRpcPlugin> httpPluginsBuilder = ImmutableMap.builder();
    if (tsdb.getConfig().hasProperty("tsd.http.rpc.plugins")) {
      final String[] plugins = tsdb.getConfig().getString("tsd.http.rpc.plugins").split(",");
      manager.initializeHttpRpcPlugins(tsdb.getMode(), plugins, httpPluginsBuilder);
    }
    manager.http_plugin_commands = httpPluginsBuilder.build();

    INSTANCE.set(manager);
    return manager;
  }
653432
public static RedisClusterManager getInstance(RedisBaseConfig redisBaseConfig) {
        if (!CACHE.containsKey(redisBaseConfig)) {
            synchronized (lock) {
                if (!CACHE.containsKey(redisBaseConfig)) {
                    CACHE.put(redisBaseConfig, newInstance(redisBaseConfig));
                }
            }
        }

        return CACHE.get(redisBaseConfig);
    }
729029
public static final synchronized ProfileManager getInstance(Object context) {
		
		return (instance == null)? 
				(instance = new ProfileService(ContextUtils.asApplication(context))) :instance;
	}
1192474
public static final synchronized StateManager getInstance(Object context) {
		
		return (instance == null)? 
				(instance = new StateService(ContextUtils.asApplication(context))) :instance;
	}
801046
def get_a_manager(threadPool_settings=None):
    
    global __singleton_manager
    if __singleton_manager is None:
        def _thread_entry():
            if prctl:
                prctl.set_name('mirte manager')
            m.run()
            l.info('manager.run() returned')
        l = logging.getLogger('mirte.get_a_manager')
        l.info("Creating new instance")
        m = Manager(logging.getLogger('mirte'))
        if threadPool_settings:
            m.update_instance('threadPool', threadPool_settings)
        threading.Thread(target=_thread_entry).start()
        m.running_event.wait()
        __singleton_manager = m
    return __singleton_manager
370496
public static SystemMain getInstance(Properties config) {
        return Guice.createInjector(new SystemInitializer(config)).getInstance(SystemMain.class);
    }
1155264
public static ResourceManager get() {
    ResourceManager resourceManager = (ResourceManager) instance.get();
    if(null == resourceManager) {
      resourceManager = new ResourceManager();
      instance.set(resourceManager);
    }
    return resourceManager;
  }
801608
public FacesConfigManagedBeanType<WebFacesConfigDescriptor> getOrCreateManagedBean()
   {
      List<Node> nodeList = model.get("managed-bean");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FacesConfigManagedBeanTypeImpl<WebFacesConfigDescriptor>(this, "managed-bean", model, nodeList.get(0));
      }
      return createManagedBean();
   }
166326
public static TinMapSharedConstants create() {
    if (tinMapConstants == null) { // NOPMD it's thread save!
      synchronized (TinMapConstants.class) {
        if (tinMapConstants == null) {
          tinMapConstants = GWT.create(TinMapConstants.class);
        }
      }
    }
    return tinMapConstants;
  }
106401
static RLSSuspendTokenManager getInstance()
    {
        if (tc.isEntryEnabled()) Tr.entry(tc, "getInstance");
        if (tc.isEntryEnabled()) Tr.exit(tc, "getInstance", _instance);
    	return _instance;
    }
672874
public ConnectionManager getConnectionManager() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(this, tc, "Connection manager is " + cm + " for managed connection " + this);
            if (cm == null && pm != null) {
                Tr.debug(this, tc, "Connection pool is " + this.pm.toString());
            }
        }
        if (cm != null) {
            return cm;
        } else {
            IllegalStateException e = new IllegalStateException("ConnectionManager is null");
            Tr.error(tc, "ILLEGAL_STATE_EXCEPTION_J2CA0079", "getConnectionManager", e);
            throw e;
        }
    }
1131564
public static ARouter getInstance() {
        if (!hasInit) {
            throw new InitException("ARouter::Init::Invoke init(context) first!");
        } else {
            if (instance == null) {
                synchronized (ARouter.class) {
                    if (instance == null) {
                        instance = new ARouter();
                    }
                }
            }
            return instance;
        }
    }
433818
public Dispatcher getInstance() {
        try {
            return (Dispatcher) Class.forName(dispatcherImpl)
                    .getConstructor(Configuration.class).newInstance(conf);
        } catch (InstantiationException e) {
            throw new AssertionError(e);
        } catch (IllegalAccessException e) {
            throw new AssertionError(e);
        } catch (ClassNotFoundException e) {
            throw new AssertionError(e);
        } catch (ClassCastException e) {
            throw new AssertionError(e);
        } catch (NoSuchMethodException e) {
            throw new AssertionError(e);
        } catch (InvocationTargetException e) {
            throw new AssertionError(e);
        }
    }
933885
public static SPIProvider getInstance()
   {
      if (me == null)
      {
         final ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
         me = SPIProviderResolver.getInstance(cl).getProvider();
      }
      return me;
   }
537910
public static synchronized final SingletonContext getInstance () {
        if ( INSTANCE == null ) {
            try {
                log.debug("Initializing singleton context");
                init(null);
            }
            catch ( CIFSException e ) {
                log.error("Failed to create singleton JCIFS context", e);
            }
        }
        return INSTANCE;
    }
74176
public static function getInstance(ObjectConfigInterface $config, ObjectManagerInterface $manager)
    {
        $name = $config->object_identifier->name;

        if(StringInflector::isSingular($name)) {
            $class = __NAMESPACE__.'\ModelEntityRow';
        } else {
            $class = __NAMESPACE__.'\ModelEntityRowset';
        }

        $instance = new $class($config);
        return $instance;
    }
1121104
public SettingsManager getSettingsManager() {
        if (settingsManager != null) {
            return settingsManager;
        }
        settingsManager = (SettingsManager) ContainerManager.getComponent("settingsManager");
        return settingsManager;
    }