Gets a Java Service implementation for this Processor.

 Note there is no JProtobuf class for this, only a Java class.

 @return a Java Blocking Service implementation for this Processor
493375
def blocking_service_impl
      interface = service_class.java_proto_class::BlockingInterface
      service_method_names = service_class.service_method_names

      clazz = Class.new(Object) do
        include interface

        def initialize(processor)
          @processor = processor
        end

        service_method_names.each do |service_method_name|
          class_eval <<-EOF, __FILE__, __LINE__+1
            def #{service_method_name}(controller, request)
              response = @processor._#{service_method_name}(!request.nil? ? JProtobuf.jprotobuf_message(request) : nil)
              !response.nil? ? response.java_proto : nil
            end
          EOF
        end
      end

      service_class.java_proto_class.new_reflective_blocking_service(clazz.new(self))
    end
1317852
public java.lang.String getJavaClass() {
    java.lang.Object ref = javaClass_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      if (bs.isValidUtf8()) {
        javaClass_ = s;
      }
      return s;
    }
  }
460136
protected ThreadFactory getThreadFactory() {
        return new ThreadFactory() {
            private final ThreadFactory parent = Executors.defaultThreadFactory();
            private final AtomicInteger tid = new AtomicInteger(1);

            @Override
            public Thread newThread(final Runnable task) {
              final Thread t = parent.newThread(task);
              t.setName(THREAD_PREFIX + tid.getAndIncrement());
              return t;
            }
          };
    }
159748
public ProcessInstance getProcessInstance() {
    Execution execution = getExecution();
    if(execution != null && !(execution.getProcessInstanceId().equals(execution.getId()))){
      return processEngine
            .getRuntimeService()
            .createProcessInstanceQuery()
            .processInstanceId(execution.getProcessInstanceId())
            .singleResult();
    }
    return (ProcessInstance) execution;
  }
1128454
@Override
	public Service getService(String name) {
		Service service = null;
		long stamp = lock.tryOptimisticRead();
		if (stamp != 0) {
			try {
				service = services.get(name);
			} catch (Exception modified) {
				stamp = 0;
			}
		}
		if (!lock.validate(stamp) || stamp == 0) {
			stamp = lock.readLock();
			try {
				service = services.get(name);
			} finally {
				lock.unlockRead(stamp);
			}
		}
		if (service == null) {
			throw new ServiceNotFoundError(nodeID, name);
		}
		return service;
	}
1141435
@Benchmark
  public Object blockingUnary() throws Exception {
    return ClientCalls.blockingUnaryCall(
        channels[0].newCall(unaryMethod, CallOptions.DEFAULT), Unpooled.EMPTY_BUFFER);
  }
1157668
public static ExecutorService getExecutorService() throws Exception {
        WebContainer instance = (WebContainer) self.get();
        if (instance != null) {
            return instance.es;
        }

        // if we're here then something is really wrong with the system.
        // could throw our own sub class exception, seems like a waste for something that shouldn't logically happen though
        Exception e = new Exception("Executor Service not available");
        throw e;
    }
810232
public ExecutorService getExecutor() {
        ExecutorService executor = executorServiceRef != null ? executorServiceRef.getService() : null;
        if (executor != null) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "The Liberty ExecutorService is being used to run asynch reactive work");
            }
            return executor;
        } else {
            // For unit testing
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "The ForkJoinPool.commonPool is being used to run asynch reactive work");
            }
            return ForkJoinPool.commonPool();

        }
    }
1114513
public @Nonnull SetType getBlockedThreads() {
        Set<ThreadLock> acquired = new HashSet<ThreadLock>();
        for (ThreadType thread: threads) {
            acquired.addAll(thread.getAcquiredLocks());
        }

        Set<ThreadType> blocked = new HashSet<ThreadType>();
        for (ThreadType thread: runtime.getThreads()) {
            if (acquired.contains(thread.getWaitingToLock())) {
                blocked.add(thread);
            }
        }

        return runtime.getThreadSet(blocked);
    }
602257
public CmsLockFilter getNonBlockingFilter() {

        if (m_nonBlockingFilter == null) {
            m_nonBlockingFilter = CmsLockFilter.FILTER_ALL;
            m_nonBlockingFilter = m_nonBlockingFilter.filterLockableByUser(
                getCms().getRequestContext().getCurrentUser());
            m_nonBlockingFilter = m_nonBlockingFilter.filterSharedExclusive();
        }
        return m_nonBlockingFilter;
    }
1345754
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
        try {
            if (com.google.api.ads.adwords.axis.v201809.cm.BatchJobOpsServiceInterface.class.isAssignableFrom(serviceEndpointInterface)) {
                com.google.api.ads.adwords.axis.v201809.cm.BatchJobOpsServiceSoapBindingStub _stub = new com.google.api.ads.adwords.axis.v201809.cm.BatchJobOpsServiceSoapBindingStub(new java.net.URL(BatchJobOpsServiceInterfacePort_address), this);
                _stub.setPortName(getBatchJobOpsServiceInterfacePortWSDDServiceName());
                return _stub;
            }
        }
        catch (java.lang.Throwable t) {
            throw new javax.xml.rpc.ServiceException(t);
        }
        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
    }
278676
@Bean(EXECUTOR_SERVICE_BEAN_NAME)
    public ExecutorService executorService() {
        if (this.properties.getNumberOfThread() == 0) {
            if (LOGGER.isDebugEnabled()) {
                LOGGER.debug("Use cached thread pool.");
            }
            return Executors.newCachedThreadPool();
        }
        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("Use {} fixed thread pool.", this.properties.getNumberOfThread());
        }
        return Executors.newFixedThreadPool(this.properties.getNumberOfThread());
    }
278594
@Override
	protected Class<?>[] getHandlerInterfaces(String serviceName) {
		Class<?> remoteInterface = interfaceMap.get(serviceName);
		if (remoteInterface != null) {
			return new Class<?>[]{remoteInterface};
		} else if (Proxy.isProxyClass(getHandler(serviceName).getClass())) {
			return getHandler(serviceName).getClass().getInterfaces();
		} else {
			return new Class<?>[]{getHandler(serviceName).getClass()};
		}
	}
1074044
protected Class<?>[] getHandlerInterfaces(final String serviceName) {
		if (remoteInterface != null) {
			return new Class<?>[]{remoteInterface};
		} else if (Proxy.isProxyClass(handler.getClass())) {
			return handler.getClass().getInterfaces();
		} else {
			return new Class<?>[]{handler.getClass()};
		}
	}
323838
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
        try {
            if (com.google.api.ads.admanager.axis.v201805.SuggestedAdUnitServiceInterface.class.isAssignableFrom(serviceEndpointInterface)) {
                com.google.api.ads.admanager.axis.v201805.SuggestedAdUnitServiceSoapBindingStub _stub = new com.google.api.ads.admanager.axis.v201805.SuggestedAdUnitServiceSoapBindingStub(new java.net.URL(SuggestedAdUnitServiceInterfacePort_address), this);
                _stub.setPortName(getSuggestedAdUnitServiceInterfacePortWSDDServiceName());
                return _stub;
            }
        }
        catch (java.lang.Throwable t) {
            throw new javax.xml.rpc.ServiceException(t);
        }
        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
    }
538493
public java.util.List<Service> getServices() {
        if (services == null) {
            services = new com.amazonaws.internal.SdkInternalList<Service>();
        }
        return services;
    }
790258
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
        try {
            if (com.google.api.ads.adwords.axis.v201809.mcm.CustomerServiceInterface.class.isAssignableFrom(serviceEndpointInterface)) {
                com.google.api.ads.adwords.axis.v201809.mcm.CustomerServiceSoapBindingStub _stub = new com.google.api.ads.adwords.axis.v201809.mcm.CustomerServiceSoapBindingStub(new java.net.URL(CustomerServiceInterfacePort_address), this);
                _stub.setPortName(getCustomerServiceInterfacePortWSDDServiceName());
                return _stub;
            }
        }
        catch (java.lang.Throwable t) {
            throw new javax.xml.rpc.ServiceException(t);
        }
        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
    }