region Service Operation
519138
public void start() throws Exception {
        Exceptions.checkNotClosed(this.closed, this);

        log.info("Initializing metrics provider ...");
        MetricsProvider.initialize(builderConfig.getConfig(MetricsConfig::builder));
        statsProvider = MetricsProvider.getMetricsProvider();
        statsProvider.start();

        log.info("Initializing ZooKeeper Client ...");
        this.zkClient = createZKClient();

        log.info("Initializing Service Builder ...");
        this.serviceBuilder.initialize();

        log.info("Creating StreamSegmentService ...");
        StreamSegmentStore service = this.serviceBuilder.createStreamSegmentService();

        log.info("Creating TableStoreService ...");
        TableStore tableStoreService = this.serviceBuilder.createTableStoreService();

        log.info("Creating Segment Stats recorder ...");
        autoScaleMonitor = new AutoScaleMonitor(service, builderConfig.getConfig(AutoScalerConfig::builder));

        TokenVerifierImpl tokenVerifier = new TokenVerifierImpl(builderConfig.getConfig(AutoScalerConfig::builder));

        // Log the configuration
        log.info(serviceConfig.toString());
        log.info(builderConfig.getConfig(AutoScalerConfig::builder).toString());

        this.listener = new PravegaConnectionListener(this.serviceConfig.isEnableTls(), this.serviceConfig.getListeningIPAddress(),
                                                      this.serviceConfig.getListeningPort(), service, tableStoreService,
                                                      autoScaleMonitor.getStatsRecorder(), autoScaleMonitor.getTableSegmentStatsRecorder(),
                                                      tokenVerifier, this.serviceConfig.getCertFile(), this.serviceConfig.getKeyFile(),
                                                      this.serviceConfig.isReplyWithStackTraceOnError());

        this.listener.startListening();
        log.info("PravegaConnectionListener started successfully.");
        log.info("StreamSegmentService started.");
    }
1301854
def do_region(self, x, y, w, h):
        """"""
        if (x is not None):
            raise IIIFError(code=501, parameter="region",
                            text="Null manipulator supports only region=/full/.")
184306
@Override
    public void run() {

        while (!registered) {
                GetOperationRequest operationRequest = new GetOperationRequest().withOperationId(operationId);
                GetOperationResult result = discoveryClient.getOperation(operationRequest);
                if (LOG.isInfoEnabled()) {
                    LOG.info("Service registration for operation " + operationId + " resulted in " + result.getOperation().getStatus());
                }
                if (result.getOperation().getStatus().equalsIgnoreCase("failure") || result.getOperation().getStatus().equalsIgnoreCase("success")) {
                    registered = true; // either way we are done
                    if (result.getOperation().getStatus().equalsIgnoreCase("failure")) {
                        if (route53AutoRegistrationConfiguration.isFailFast() && embeddedServerInstance instanceof EmbeddedServerInstance) {
                            if (LOG.isErrorEnabled()) {
                                LOG.error("Error registering instance shutting down instance because failfast is set.");
                            }
                            ((EmbeddedServerInstance) embeddedServerInstance).getEmbeddedServer().stop();
                        }
                    }
                }
            }
            try {
                Thread.currentThread().sleep(5000);
            } catch (InterruptedException e) {
                if (LOG.isErrorEnabled()) {
                    LOG.error("Registration monitor service has been aborted, unable to verify proper service registration on Route 53.", e);
                }
            }
        }
74041
function Region() {

        this.subRegions = [];

        this.nSubRegions = 0;

        this.node = null;

        this.mass = 0;

        this.centerOfMass = null;

        this.bbox = new Float32Array(4);

        this.size = 0;
    }
1011509
def __get_region(conn, vm_):
    '''
    
    '''
    location = __get_location(conn, vm_)
    region = '-'.join(location.name.split('-')[:2])

    return conn.ex_get_region(region)
534633
function (options, region, verbose, mCb) {
		infraExtras.getRegion(options, region, verbose, (err, resR) => {
			if (err) {
				infraExtras.getZone(options, region, verbose, (err, resZ) => {
					if (err) {
						return mCb(err);
					} else {
						return mCb(null, resZ);
					}
				});
			} else {
				return mCb(null, resR);
			}
		});
	}
448071
protected T service(PathMapping pathMapping, Service<I, O> service) {
        return service(CompositeServiceEntry.of(pathMapping, service));
    }
594630
@Override
	public OperationResult<R> tryOperation(Operation<CL, R> operation) throws ConnectionException {
	    Operation<CL, R> filteredOperation = config.getOperationFilterFactory().attachFilter(operation);
	    
        while (true) {
            attemptCounter++;
            
            try {
                connection = borrowConnection(filteredOperation);
                startTime = System.currentTimeMillis();
                OperationResult<R> result = connection.execute(filteredOperation);
                result.setAttemptsCount(attemptCounter);
                monitor.incOperationSuccess(getCurrentHost(), result.getLatency());
                return result;
            }
            catch (Exception e) {
                ConnectionException ce = (e instanceof ConnectionException) ? (ConnectionException) e
                        : new UnknownException(e);
            	try {
            		informException(ce);
                    monitor.incFailover(ce.getHost(), ce);
            	}
            	catch (ConnectionException ex) {
                    monitor.incOperationFailure(getCurrentHost(), ex);
                    throw ex;
            	}
            }
            finally {
            	releaseConnection();
            }
        }
    }
1047918
public void setRegions(java.util.Collection<Region> regions) {
        if (regions == null) {
            this.regions = null;
            return;
        }

        this.regions = new com.amazonaws.internal.SdkInternalList<Region>(regions);
    }
863212
function (options) {
    var regions;
    this._initRegionManager();

    if (_.isFunction(this.regions)) {
      regions = this.regions(options);
    } else {
      regions = this.regions || {};
    }

    this.addRegions(regions);
  }
244212
function checkExecParamsRegionSuccessError(region, success, error)
{
	var caller = checkExecParamsRegionSuccessError.caller.name

	if (typeof region != 'object') {
		console.error('Error: region parameter is not an object in: ' + caller);
		return false;
	}

	if (typeof success != 'function') {
		console.error('Error: success parameter is not a function in: ' + caller);
		return false;
	}

	if (typeof error != 'function') {
		console.error('Error: error parameter is not a function in: ' + caller);
		return false;
	}

	return true;
}
950855
private void updateRegion() {
		actMessagePanel.setVisible(false);

		if (rbtACT.isSelected()) {
			actMessagePanel.setVisible(true);
			regionFields.setVisible(true);
			regionSelector.setOptions(new String[]{null, "Belconnen", "City", "Woden"});
			regionSelector.setVisible(true);
		} else if (rbtNSW.isSelected()) {
			regionFields.setVisible(true);
			regionSelector.setOptions(
					new String[]{null, "Hunter", "Riverina", "Southern Tablelands"});
			regionSelector.setVisible(true);
		} else if (rbtVIC.isSelected()) {
			regionFields.setVisible(true);
			regionSelector.setOptions(
					new String[]{null, "Gippsland", "Melbourne", "Mornington Peninsula"});
			regionSelector.setVisible(true);
		} else {
			regionSelector.setOptions(new Object[]{null});
			regionSelector.setVisible(false);
			regionFields.setVisible(false);
		}
	}
1079294
def _load_region(self, acct_id, region_name, path):
        """"""
        lim_path = os.path.join(path, 'limit_overrides.json')
        thresh_path = os.path.join(path, 'threshold_overrides.json')
        res = {'limit_overrides': {}, 'threshold_overrides': {}}
        if os.path.exists(lim_path):
            with open(lim_path, 'r') as fh:
                res['limit_overrides'] = json.loads(fh.read())
        if os.path.exists(thresh_path):
            with open(thresh_path, 'r') as fh:
                res['threshold_overrides'] = json.loads(fh.read())
        self._config[acct_id]['regions'][region_name] = res
551709
public static void setRegionExitPeriod(long regionExitPeriod){
        sExitRegionPeriod = regionExitPeriod;
        BeaconManager instance = sInstance;
        if (instance != null) {
            instance.applySettings();
        }
    }
540259
def do_use(self, region):
        
        if self._local_endpoint is not None:
            host, port = self._local_endpoint  # pylint: disable=W0633
            self.engine.connect(
                region, session=self.session, host=host, port=port, is_secure=False
            )
        else:
            self.engine.connect(region, session=self.session)
719611
public void setRegionOrder(java.util.Collection<String> regionOrder) {
        if (regionOrder == null) {
            this.regionOrder = null;
            return;
        }

        this.regionOrder = new com.amazonaws.internal.SdkInternalList<String>(regionOrder);
    }
54232
public void setGroupLocalService(
		com.liferay.portal.kernel.service.GroupLocalService groupLocalService) {
		this.groupLocalService = groupLocalService;
	}