Creates a coordinator and returns it.
504084
def get_coordinator():
    """"""
    workflow_queue = Queue.Queue()
    complete_queue = Queue.Queue()
    coordinator = WorkflowThread(workflow_queue, complete_queue)
    coordinator.register(WorkflowItem, workflow_queue)
    return coordinator
117667
def create(cls, selection, config, **kwargs):
        """"""

        if selection['target'] is not None:
            return cls.create_from_source(selection['target'],
                                          config, **kwargs)
        else:
            target_skydir = wcs_utils.get_target_skydir(selection)
            return cls.create_from_position(target_skydir, config, **kwargs)
543832
private ComponentManager createComponentManager(String namespace)
    {
        String prefix = NamespaceUtils.getPrefix(namespace);

        ComponentManagerFactory componentManagerFactory;
        try {
            componentManagerFactory = this.rootComponentManager.getInstance(ComponentManagerFactory.class, prefix);
        } catch (ComponentLookupException e) {
            componentManagerFactory = this.defaultComponentManagerFactory;
        }

        return componentManagerFactory.createComponentManager(namespace, this.rootComponentManager);
    }
472299
def createManager(self, services, yadis_url=None):
        
        key = self.getSessionKey()
        if self.getManager():
            raise KeyError('There is already a %r manager for %r' %
                           (key, self.url))

        if not services:
            return None

        manager = YadisServiceManager(self.url, yadis_url, services, key)
        manager.store(self.session)
        return manager
758021
protected function createDocumentManager()
    {
        AnnotationDriver::registerAnnotationClasses();

        $configuration = new Configuration();
        $configuration->setProxyDir($this->configuration['doctrine']['proxyDir']);
        $configuration->setProxyNamespace($this->configuration['doctrine']['proxyNamespace']);
        $configuration->setHydratorDir($this->configuration['doctrine']['hydratorDir']);
        $configuration->setHydratorNamespace($this->configuration['doctrine']['hydratorNamespace']);
        $configuration->setMetadataDriverImpl(AnnotationDriver::create());

        return DocumentManager::create(new Connection($this->configuration['doctrine']['connection']['server']), $configuration);
    }
798920
def create_role(self, role_name, role_type, host_id):
    
    return roles.create_role(self._get_resource_root(), self.name, role_type,
        role_name, host_id, self._get_cluster_name())
588902
private P createViewIdAndCreatePresenter() {

    P presenter = delegateCallback.createPresenter();
    if (presenter == null) {
      throw new NullPointerException("Presenter returned from createPresenter() is null.");
    }
    if (keepPresenterDuringScreenOrientationChange) {
      Context context = delegateCallback.getContext();
      mosbyViewId = UUID.randomUUID().toString();
      PresenterManager.putPresenter(PresenterManager.getActivity(context), mosbyViewId, presenter);
    }
    return presenter;
  }
537334
public static ExtensibleConfigurationPersister createCachedRemoteDomainXmlConfigurationPersister(final File configDir, ExecutorService executorService, ExtensionRegistry extensionRegistry) {
        return createRemoteBackupDomainXmlConfigurationPersister(configDir, executorService, extensionRegistry);
    }
68271
protected static KeyComponent createComponent(Facet facet, ConverterRegistry converterRegistry, NamingStrategy namingStrategy, PojoBindingFactory pojoBindingFactory) {
        Converter converter = converterRegistry.getConverter(facet.getType());
        if (facet.hasAnnotation(PartitionKey.class)) {
            if (converter == null) {
                throw new HecateException("No converter found for @PartitionKey facet \"%s\".", facet.getName());
            }
            return new PartitionKeyComponent(facet, namingStrategy.getColumnName(facet), converter);
        } else {
            if (converter == null) {
                PojoBinding<?> pojoBinding = pojoBindingFactory.createPojoBinding(facet.getType().getRawType());
                return pojoBinding.getKeyBinding().createClusteringColumnReferenceComponent(facet, pojoBinding, namingStrategy);
            } else
                return new ClusteringColumnComponent(facet, namingStrategy.getColumnName(facet), converter);
        }
    }
831810
def make_server(
        server_class, handler_class, authorizer_class, filesystem_class,
        host_port, file_access_user=None, **handler_options):
    
    from . import compat
    if isinstance(handler_class, compat.string_type):
        handler_class = import_class(handler_class)

    if isinstance(authorizer_class, compat.string_type):
        authorizer_class = import_class(authorizer_class)

    if isinstance(filesystem_class, compat.string_type):
        filesystem_class = import_class(filesystem_class)

    authorizer = authorizer_class(file_access_user)
    handler = handler_class
    for key, value in handler_options.items():
        setattr(handler, key, value)
    handler.authorizer = authorizer
    if filesystem_class is not None:
        handler.abstracted_fs = filesystem_class
    return server_class(host_port, handler)
367964
private void waitForCoordinator()
   {
      LOG.info("Waiting to be released by the coordinator");
      try
      {
         lock.await();
      }
      catch (InterruptedException e)
      {
         Thread.currentThread().interrupt();
      }
   }
1100060
def create(self, create_missing=None):
        
        return Registry(
            self._server_config,
            id=self.create_json(create_missing)['id'],
        ).read()
39498
def create(cls, this: str, super_: str=u'java/lang/Object') -> 'ClassFile':
        
        cf = ClassFile()
        cf.access_flags.acc_public = True
        cf.access_flags.acc_super = True

        cf.this = cf.constants.create_class(this)
        cf.super_ = cf.constants.create_class(super_)

        return cf
757530
def create_from_source(cls, name, config, **kwargs):
        """"""

        coordsys = kwargs.pop('coordsys', 'CEL')

        roi = cls(config, src_radius=None, src_roiwidth=None,
                  srcname=name, **kwargs)
        src = roi.get_source_by_name(name)

        return cls.create_from_position(src.skydir, config,
                                        coordsys=coordsys, **kwargs)
240659
def contributor_director(**kwargs):
    """"""
    if kwargs.get('qualifier') in ETD_MS_CONTRIBUTOR_EXPANSION:
        # Return the element object.
        return ETD_MSContributor(
            role=ETD_MS_CONTRIBUTOR_EXPANSION[kwargs.get('qualifier')],
            **kwargs
        )
    else:
        return None
664616
public static ComapiClient createShared(@NonNull ComapiConfig config) {

        if (instance == null) {
            synchronized (ComapiClient.class) {
                if (instance == null) {
                    instance = new ComapiClient(config);
                }
            }
        }

        return instance;
    }
5137
def get_flow(self, name, options=None):
        
        config = self.project_config.get_flow(name)
        callbacks = self.callback_class()
        coordinator = FlowCoordinator(
            self.project_config,
            config,
            name=name,
            options=options,
            skip=None,
            callbacks=callbacks,
        )
        return coordinator