Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
2,900 | boolean () { return true; } | isDone |
2,901 | Boolean () { return Boolean.FALSE; } | get |
2,902 | Boolean (long timeout, @NotNull TimeUnit unit) { return Boolean.FALSE; } | get |
2,903 | boolean (boolean mayInterruptIfRunning) { return false; // not supported } | cancel |
2,904 | boolean () { return false; // not supported, as cancel is handled via CancelStatus } | isCancelled |
2,905 | void (Channel channel) { channel.pipeline().addLast(myChannelRegistrar, new ProtobufVarint32FrameDecoder(), new ProtobufDecoder(JavacRemoteProto.Message.getDefaultInstance()), new ProtobufVarint32LengthFieldPrepender(), new ProtobufEncoder(), compilationRequestsHandler); } | initChannel |
2,906 | ExternalJavacRunResult (String javaHome, int heapSize, Iterable<String> vmOptions, Iterable<String> options, CompilationPaths paths, Iterable<? extends File> files, Map<File, Set<File>> outs, DiagnosticOutputConsumer diagnosticSink, OutputFileConsumer outputSink, JavaCompilingTool compilingTool, CanceledStatus cancelStatus, final boolean keepProcessAlive) { try { final ExternalJavacProcessHandler running = findRunningProcess(processHash(javaHome, vmOptions, compilingTool)); final ExternalJavacProcessHandler processHandler = running != null? running : launchExternalJavacProcess( javaHome, heapSize, myListenPort, myWorkingDir, vmOptions, compilingTool, keepProcessAlive ); final Channel channel = lookupChannel(processHandler.getProcessId()); if (channel != null) { final ExternalJavacMessageHandler.WslSupport wslSupport = WSL_SUPPORT.get(processHandler); final ExternalJavacMessageHandler.WslSupport converter = wslSupport instanceof WslToLinuxPathConverter? ((WslToLinuxPathConverter)wslSupport).reverseConverter() : ExternalJavacMessageHandler.WslSupport.DIRECT; final CompileSession session = new CompileSession( processHandler.getProcessId(), new ExternalJavacMessageHandler(diagnosticSink, outputSink, getEncodingName(options), converter), cancelStatus ); mySessions.put(session.getId(), session); channel.writeAndFlush(JavacProtoUtil.toMessage(session.getId(), JavacProtoUtil.createCompilationRequest( options, files, paths.getClasspath(), paths.getPlatformClasspath(), paths.getModulePath(), paths.getUpgradeModulePath(), paths.getSourcePath(), outs, wslSupport ))); return session; } else { LOG.warn("Failed to connect to javac process"); } } catch (Throwable e) { LOG.info(e); diagnosticSink.report(new PlainMessageDiagnostic(Diagnostic.Kind.ERROR, e.getMessage())); } return ExternalJavacRunResult.FAILURE; } | forkJavac |
2,907 | boolean (long time, @NotNull TimeUnit unit) { final Collection<ExternalJavacProcessHandler> processes; synchronized (myRunningProcesses) { processes = new ArrayList<>(myRunningProcesses.values()); } for (ProcessHandler handler : processes) { if (!handler.waitFor(unit.toMillis(time))) { return false; } } return true; } | waitForAllProcessHandlers |
2,908 | boolean (long time, @NotNull TimeUnit unit) { if (myOwnExecutor && myExecutor instanceof ExecutorService) { try { return ((ExecutorService)myExecutor).awaitTermination(time, unit); } catch (InterruptedException ignored) { } } return true; } | awaitNettyThreadPoolTermination |
2,909 | ExternalJavacProcessHandler (int processHash) { debug(()-> "findRunningProcess: looking for hash " + processHash); List<ExternalJavacProcessHandler> idleProcesses = null; try { synchronized (myRunningProcesses) { for (Map.Entry<UUID, ExternalJavacProcessHandler> entry : myRunningProcesses.entrySet()) { final ExternalJavacProcessHandler process = entry.getValue(); if (!process.isKeepProcessAlive()) { //we shouldn't try to reuse process which will stop after finishing the current compilation continue; } final Integer hash = PROCESS_HASH.get(process); if (hash != null && hash == processHash && process.lock()) { debug(()-> "findRunningProcess: returning process " + process.getProcessId() + " for hash " + processHash); return process; } if (process.getIdleTime() > myKeepAliveTimeout) { if (idleProcesses == null) { idleProcesses = new ArrayList<>(); } debug(()-> "findRunningProcess: adding " + process.getProcessId() + " to idle list"); idleProcesses.add(process); } } } debug(()-> "findRunningProcess: no running process for " + processHash + " is found"); return null; } finally { if (idleProcesses != null) { for (ExternalJavacProcessHandler process : idleProcesses) { shutdownProcess(process); } } } } | findRunningProcess |
2,910 | void (Supplier<String> message) { if (LOG.isDebugEnabled()) { LOG.debug(message.get()); } } | debug |
2,911 | int (String sdkHomePath, Iterable<String> vmOptions, JavaCompilingTool tool) { Collection<? extends String> opts = vmOptions instanceof Collection<?>? (Collection<String>)vmOptions : Iterators.collect(vmOptions, new ArrayList<>()); return Objects.hash(sdkHomePath.replace(File.separatorChar, '/'), opts, tool.getId()); } | processHash |
2,912 | boolean () { return !myChannelRegistrar.isEmpty(); } | isRunning |
2,913 | void () { synchronized (myConnections) { for (Map.Entry<UUID, Channel> entry : myConnections.entrySet()) { entry.getValue().writeAndFlush(JavacProtoUtil.toMessage(entry.getKey(), JavacProtoUtil.createShutdownRequest())); } } myChannelRegistrar.close().awaitUninterruptibly(); if (myOwnExecutor && myExecutor instanceof ExecutorService) { final ExecutorService service = (ExecutorService)myExecutor; service.shutdown(); try { service.awaitTermination(15, TimeUnit.SECONDS); } catch (InterruptedException ignored) { } } } | stop |
2,914 | void () { List<ExternalJavacProcessHandler> idleProcesses = null; synchronized (myRunningProcesses) { for (ExternalJavacProcessHandler process : myRunningProcesses.values()) { final long idle = process.getIdleTime(); if (idle > myKeepAliveTimeout) { if (idleProcesses == null) { idleProcesses = new ArrayList<>(); } idleProcesses.add(process); } } } if (idleProcesses != null) { for (ExternalJavacProcessHandler process : idleProcesses) { shutdownProcess(process); } } } | shutdownIdleProcesses |
2,915 | boolean (ExternalJavacProcessHandler process) { UUID processId = process.getProcessId(); debug(()-> "shutdownProcess: shutting down " + processId); final Channel conn = myConnections.get(processId); if (conn != null && process.lock()) { debug(()-> "shutdownProcess: sending shutdown request to " + processId); conn.writeAndFlush(JavacProtoUtil.toMessage(processId, JavacProtoUtil.createShutdownRequest())); return true; } return false; } | shutdownProcess |
2,916 | void (@NotNull ProcessEvent event) { final UUID processId = ((ExternalJavacProcessHandler)event.getProcessHandler()).getProcessId(); debug(()-> "process " + processId + " terminated"); myRunningProcesses.remove(processId); if (myConnections.get(processId) == null) { // only if connection has never been established // otherwise we rely on the fact that ExternalJavacProcess always closes connection before shutdown and clean sessions on ChannelUnregister event cleanSessions(processId); } } | processTerminated |
2,917 | void (UUID processId) { synchronized (mySessions) { for (Iterator<Map.Entry<UUID, CompileSession>> it = mySessions.entrySet().iterator(); it.hasNext(); ) { final CompileSession session = it.next().getValue(); if (processId.equals(session.getProcessId())) { session.setDone(); it.remove(); } } } } | cleanSessions |
2,918 | void (@NotNull ProcessEvent event, @NotNull Key outputType) { final String text = event.getText(); if (!StringUtil.isEmptyOrSpaces(text)) { if (LOG.isTraceEnabled()) { LOG.trace("text from javac: " + text); } String prefix = null; if (outputType == ProcessOutputTypes.STDOUT) { prefix = STDOUT_LINE_PREFIX; } else if (outputType == ProcessOutputTypes.STDERR) { prefix = STDERR_LINE_PREFIX; } if (prefix != null) { List<DiagnosticOutputConsumer> consumers = null; final UUID processId = ((ExternalJavacProcessHandler)event.getProcessHandler()).getProcessId(); synchronized (mySessions) { for (CompileSession session : mySessions.values()) { if (processId.equals(session.getProcessId())) { if (consumers == null) { consumers = new ArrayList<>(); } consumers.add(session.myHandler.getDiagnosticSink()); } } } final String msg = prefix + ": " + text; if (consumers != null) { for (DiagnosticOutputConsumer consumer : consumers) { consumer.outputLineAvailable(msg); } } else { LOG.info(msg.trim()); } } } } | onTextAvailable |
2,919 | ExternalJavacProcessHandler (UUID processId, @NotNull Process process, @NotNull String commandLine, boolean keepProcessAlive) { return new ExternalJavacProcessHandler(processId, process, commandLine, keepProcessAlive); } | createProcessHandler |
2,920 | void (List<? super String> cmdLine, String parameter) { if (SystemInfo.isWindows) { if (parameter.contains("\"")) { parameter = parameter.replace("\"", "\\\""); } else if (parameter.isEmpty()) { parameter = "\"\""; } } cmdLine.add(parameter); } | appendParam |
2,921 | void (List<? super String> cmdLine, String name) { String value = System.getProperty(name); if (value != null) { appendParam(cmdLine, "-D" + name + '=' + value); } } | copyProperty |
2,922 | void (@Nullable Path wslExePath) { if (wslExePath != null) { myWslExePath = wslExePath.toAbsolutePath().toString(); } } | setWslExecutablePath |
2,923 | UUID () { return myProcessId; } | getProcessId |
2,924 | boolean () { return myKeepProcessAlive; } | isKeepProcessAlive |
2,925 | void (final ChannelHandlerContext context, JavacRemoteProto.Message message) { // in case of REQUEST_ACK this is a process ID, otherwise this is a sessionId final UUID msgUuid = JavacProtoUtil.fromProtoUUID(message.getSessionId()); CompileSession session = mySessions.get(msgUuid); final ExternalJavacMessageHandler handler = session != null? session.myHandler : null; final JavacRemoteProto.Message.Type messageType = message.getMessageType(); JavacRemoteProto.Message reply = null; try { if (messageType == JavacRemoteProto.Message.Type.RESPONSE) { final JavacRemoteProto.Message.Response response = message.getResponse(); final JavacRemoteProto.Message.Response.Type responseType = response.getResponseType(); if (responseType == JavacRemoteProto.Message.Response.Type.REQUEST_ACK) { // in this case msgUuid is a process ID, so we need to save the channel, associated with the process final Channel channel = context.channel(); channel.attr(PROCESS_ID_KEY).set(msgUuid); synchronized (myConnections) { myConnections.put(msgUuid, channel); myConnections.notifyAll(); } return; } } if (handler != null) { final boolean terminateOk = handler.handleMessage(message); if (terminateOk) { session.setDone(); mySessions.remove(session.getId()); final ExternalJavacProcessHandler process = myRunningProcesses.get(session.getProcessId()); if (process != null) { process.unlock(); } } else if (session.isCancelRequested()) { reply = JavacProtoUtil.toMessage(msgUuid, JavacProtoUtil.createCancelRequest()); } } else { LOG.info("No message handler is registered to handle message " + messageType.name() + "; canceling the process"); reply = JavacProtoUtil.toMessage(msgUuid, JavacProtoUtil.createCancelRequest()); } } finally { if (reply != null) { context.channel().writeAndFlush(reply); } } } | channelRead0 |
2,926 | Channel (UUID processId) { Channel channel = null; synchronized (myConnections) { channel = myConnections.get(processId); debug(channel, ch-> "lookupChannel: channel for " + processId + " is " + ch); while (channel == null) { if (!myRunningProcesses.containsKey(processId)) { debug(()-> "lookupChannel: no process for " + processId); break; // the process is already gone } try { myConnections.wait(300L); } catch (InterruptedException ignored) { } channel = myConnections.get(processId); debug(channel, ch-> "lookupChannel: after wait channel for " + processId + " is " + ch); } } return channel; } | lookupChannel |
2,927 | boolean () { return openChannels.isEmpty(); } | isEmpty |
2,928 | void (@NotNull Channel serverChannel) { assert serverChannel instanceof ServerChannel; openChannels.add(serverChannel); } | add |
2,929 | ChannelGroupFuture () { EventLoopGroup eventLoopGroup = null; for (Channel channel : openChannels) { if (channel instanceof ServerChannel) { eventLoopGroup = channel.eventLoop().parent(); break; } } try { return openChannels.close(); } finally { if (eventLoopGroup != null) { eventLoopGroup.shutdownGracefully(0, 15, TimeUnit.SECONDS); } } } | close |
2,930 | UUID () { return myId; } | getId |
2,931 | UUID () { return myProcessId; } | getProcessId |
2,932 | boolean () { return myDone.isUp(); } | isDone |
2,933 | void () { myDone.up(); } | setDone |
2,934 | boolean () { return myHandler.isTerminatedSuccessfully(); } | isTerminatedSuccessfully |
2,935 | Boolean () { while (true) { try { if (myDone.waitForUnsafe(300L)) { break; } } catch (InterruptedException ignored) { } notifyCancelled(); } boolean successfully = isTerminatedSuccessfully(); if (!successfully) { debug(()-> "Javac compile session " + myId + " in process " + myProcessId + "didn't terminate successfully"); } return successfully; } | get |
2,936 | void () { if (isCancelRequested() && myRunningProcesses.containsKey(myProcessId)) { final Channel channel = myConnections.get(myProcessId); if (channel != null) { channel.writeAndFlush(JavacProtoUtil.toMessage(myId, JavacProtoUtil.createCancelRequest())); } } } | notifyCancelled |
2,937 | String () { return myDistributionId; } | getDistributionId |
2,938 | String (String path) { final String normalized = FileUtilRt.toSystemIndependentName(path); if (isWslPath(normalized)) { final int distrSeparatorIndex = normalized.indexOf('/', WSL_PATH_PREFIX.length()); return distrSeparatorIndex > WSL_PATH_PREFIX.length()? normalized.substring(distrSeparatorIndex) : normalized; } if (isWinPath(normalized)) { return MNT_PREFIX + Character.toLowerCase(normalized.charAt(0)) + normalized.substring(2); } return normalized; } | convertPath |
2,939 | boolean (File file) { return file != null && isWslPath(FileUtilRt.toSystemIndependentName(file.getAbsolutePath())); } | isWslPath |
2,940 | boolean (String path) { return path.startsWith(WSL_PATH_PREFIX); } | isWslPath |
2,941 | boolean (String path) { return OSAgnosticPathUtil.isAbsoluteDosPath(path); } | isWinPath |
2,942 | ModulePath () { return myModulePath; } | getModulePath |
2,943 | CompilationPaths (@Nullable Iterable<? extends File> platformCp, @Nullable Iterable<? extends File> cp, @Nullable Iterable<? extends File> upgradeModCp, @NotNull ModulePath modulePath, @Nullable Iterable<? extends File> sourcePath) { return new CompilationPaths(platformCp, cp, upgradeModCp, modulePath, sourcePath); } | create |
2,944 | Collection<String> (@NotNull JavaCompilingTool tool, int compilerSdkVersion) { if (tool.getId().equals(JavaCompilers.JAVAC_ID)) { return Collections.singletonList("-D" + ExternalRefCollectorCompilerToolExtension.ENABLED_PARAM + "=" + isEnabled()); } return Collections.emptyList(); } | getOptions |
2,945 | boolean () { for (JavacFileReferencesRegistrar listener : JpsServiceManager.getInstance().getExtensions(JavacFileReferencesRegistrar.class)) { if (listener.isEnabled()) { return true; } } return false; } | isEnabled |
2,946 | boolean () { if (hasServiceManager()) { for (JavacFileReferencesRegistrar registrar : JpsServiceManager.getInstance().getExtensions(JavacFileReferencesRegistrar.class)) { if (registrar.isEnabled()) { return true; } } } return false; } | isEnabled |
2,947 | boolean () { try { @SuppressWarnings("unused") final Class<JpsServiceManager> jpsServiceManager = JpsServiceManager.class; return true; } catch (NoClassDefFoundError ignored) { return false; } } | hasServiceManager |
2,948 | JpsJLinkProperties (List<ArtifactPropertiesState> stateList) { final ArtifactPropertiesState state = findApplicationProperties(stateList); if (state != null) { final Element options = state.getOptions(); if (options != null) return new JpsJLinkProperties(XmlSerializer.deserialize(options, JpsJLinkProperties.class)); } return new JpsJLinkProperties(); } | loadProperties |
2,949 | ArtifactPropertiesState (List<ArtifactPropertiesState> stateList) { return ContainerUtil.find(stateList, state -> "jlink-properties".equals(state.getId())); } | findApplicationProperties |
2,950 | void (@NotNull CompileContext context) { LOG.info("jlink task was started"); JpsSdk<?> javaSdk = findValidSdk(context); if (javaSdk == null) { error(context, JpsBuildBundle.message("packaging.jlink.build.task.wrong.java.version")); return; } JpsJLinkProperties properties = (JpsJLinkProperties)myArtifact.getProperties(); String artifactOutputPath = myArtifact.getOutputPath(); if (artifactOutputPath == null) { error(context, JpsBuildBundle.message("packaging.jlink.build.task.unknown.artifact.path")); return; } Path runtimeImagePath = Paths.get(artifactOutputPath, IMAGE_DIR_NAME); List<String> commands = buildCommands(context, properties, javaSdk, artifactOutputPath, runtimeImagePath); if (commands.isEmpty()) return; try { FileUtil.delete(runtimeImagePath); } catch (IOException e) { error(context, JpsBuildBundle.message("packaging.jlink.build.task.run.time.image.deletion.failure")); return; } final int errorCode = startProcess(context, commands, properties); if (errorCode != 0) { error(context, JpsBuildBundle.message("packaging.jlink.build.task.failure")); return; } LOG.info("jlink task was finished"); } | build |
2,951 | List<String> (@NotNull CompileContext context, @NotNull JpsJLinkProperties properties, @NotNull JpsSdk<?> javaSdk, @NotNull String artifactOutputPath, @NotNull Path runtimeImagePath) { String modulesSequence = getModulesSequence(artifactOutputPath); if (StringUtil.isEmpty(modulesSequence)) { error(context, JpsBuildBundle.message("packaging.jlink.build.task.modules.not.found")); return Collections.emptyList(); } String sdkHomePath = javaSdk.getHomePath(); String jLinkPath = Paths.get(sdkHomePath, "bin", "jlink").toString(); List<String> commands = new ArrayList<>(); commands.add(jLinkPath); if (properties.compressionLevel != null && properties.compressionLevel.hasCompression()) { addOption(commands, "--compress", String.valueOf(properties.compressionLevel.myValue)); } if (properties.verbose) { commands.add("--verbose"); } commands.add("--module-path"); commands.add(String.join(File.pathSeparator, artifactOutputPath, Paths.get(sdkHomePath, "jmods").toString())); commands.add("--add-modules"); commands.add(modulesSequence); addOption(commands, "--output", runtimeImagePath.toString()); LOG.info(String.join(" ", commands)); return commands; } | buildCommands |
2,952 | int (@NotNull CompileContext context, @NotNull List<String> commands, @NotNull JpsJLinkProperties properties) { File arg_file = null; try { final AtomicInteger exitCode = new AtomicInteger(); final @NlsSafe StringBuilder errorOutput = new StringBuilder(); final List<@NlsSafe String> delayedInfoOutput = new ArrayList<>(); arg_file = FileUtil.createTempFile("jlink_arg_file", null); CommandLineWrapperUtil.writeArgumentsFile(arg_file, commands.subList(1, commands.size()), StandardCharsets.UTF_8); List<String> newCommands = Arrays.asList(commands.get(0), "@" + arg_file.getCanonicalPath()); final Process process = new ProcessBuilder(CommandLineUtil.toCommandLine(newCommands)).start(); BaseOSProcessHandler handler = new BaseOSProcessHandler(process, newCommands.toString(), null); handler.addProcessListener(new ProcessAdapter() { @Override public void processTerminated(@NotNull ProcessEvent event) { exitCode.set(event.getExitCode()); } @Override public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) { String message = StringUtil.trimTrailing(event.getText()); if (outputType == ProcessOutputTypes.STDERR) { errorOutput.append(event.getText()); } else { if (properties.verbose) { info(context, message); } else { delayedInfoOutput.add(message); } } } }); handler.startNotify(); handler.waitFor(); int result = exitCode.get(); if (result != 0) { final String message = errorOutput.toString(); if (!StringUtil.isEmptyOrSpaces(message)) { error(context, message); } for (@NlsSafe String info : delayedInfoOutput) { error(context, info); } } return result; } catch (Throwable e) { error(context, e.getMessage()); LOG.error(e); return -1; } finally { if (arg_file != null) { FileUtil.delete(arg_file); } } } | startProcess |
2,953 | void (@NotNull ProcessEvent event) { exitCode.set(event.getExitCode()); } | processTerminated |
2,954 | void (@NotNull ProcessEvent event, @NotNull Key outputType) { String message = StringUtil.trimTrailing(event.getText()); if (outputType == ProcessOutputTypes.STDERR) { errorOutput.append(event.getText()); } else { if (properties.verbose) { info(context, message); } else { delayedInfoOutput.add(message); } } } | onTextAvailable |
2,955 | void (List<String> commands, @NotNull String key, @Nullable String value) { if (!StringUtil.isEmpty(value)) { commands.add(key); commands.add(value); } } | addOption |
2,956 | void (@NotNull CompileContext compileContext, @Nls String message) { compileContext.processMessage(new CompilerMessage("jlink", BuildMessage.Kind.ERROR, message)); } | error |
2,957 | void (@NotNull CompileContext compileContext, @Nls String message) { compileContext.processMessage(new CompilerMessage("jlink", BuildMessage.Kind.INFO, message)); } | info |
2,958 | JpsJLinkProperties () { return new JpsJLinkProperties(this); } | createCopy |
2,959 | void (@NotNull JpsJLinkProperties modified) { copyToThis(modified); } | applyChanges |
2,960 | void (@NotNull JpsJLinkProperties copy) { compressionLevel = copy.compressionLevel; verbose = copy.verbose; } | copyToThis |
2,961 | String (@NotNull CompressionLevel value) { return String.valueOf(value.myValue); } | toString |
2,962 | void (Channel channel) { channel.pipeline().addLast(new ProtobufVarint32FrameDecoder(), new ProtobufDecoder(msgDefaultInstance), new ProtobufVarint32LengthFieldPrepender(), new ProtobufEncoder(), myMessageHandler); } | initChannel |
2,963 | boolean (final String host, final int port) { if (myState.compareAndSet(State.DISCONNECTED, State.CONNECTING)) { boolean success = false; try { final Bootstrap bootstrap = new Bootstrap().group(myEventLoopGroup).channel(NioSocketChannel.class).handler(myChannelInitializer); bootstrap.option(ChannelOption.TCP_NODELAY, true).option(ChannelOption.SO_KEEPALIVE, true); final ChannelFuture future = bootstrap.connect(host, port).syncUninterruptibly(); success = future.isSuccess(); if (success) { myConnectFuture = future; try { onConnect(); } catch (Throwable e) { LOG.error(e); } } return success; } finally { myState.compareAndSet(State.CONNECTING, success? State.CONNECTED : State.DISCONNECTED); } } // already connected return true; } | connect |
2,964 | void () { } | onConnect |
2,965 | void () { } | beforeDisconnect |
2,966 | void () { } | onDisconnect |
2,967 | void () { if (myState.compareAndSet(State.CONNECTED, State.DISCONNECTING)) { try { final ChannelFuture future = myConnectFuture; if (future != null) { try { beforeDisconnect(); } catch (Throwable e) { LOG.error(e); } final ChannelFuture closeFuture = future.channel().close(); closeFuture.awaitUninterruptibly(); } } finally { myConnectFuture = null; myState.compareAndSet(State.DISCONNECTING, State.DISCONNECTED); try { onDisconnect(); } catch (Throwable e) { LOG.error(e); } } } } | disconnect |
2,968 | boolean () { return myState.get() == State.CONNECTED; } | isConnected |
2,969 | RequestFuture<T> (final UUID messageId, MessageLite message, final @Nullable T responseHandler, final @Nullable RequestFuture.CancelAction<T> cancelAction) { final RequestFuture<T> requestFuture = new RequestFuture<>(responseHandler, messageId, cancelAction); myMessageHandler.registerFuture(messageId, requestFuture); final ChannelFuture connectFuture = myConnectFuture; final Channel channel = connectFuture != null? connectFuture.channel() : null; if (channel != null && channel.isActive()) { channel.writeAndFlush(message).addListener(new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture future) { if (!future.isSuccess()) { notifyTerminated(messageId, requestFuture, responseHandler); } } }); } else { notifyTerminated(messageId, requestFuture, responseHandler); } return requestFuture; } | sendMessage |
2,970 | void (ChannelFuture future) { if (!future.isSuccess()) { notifyTerminated(messageId, requestFuture, responseHandler); } } | operationComplete |
2,971 | void (UUID messageId, RequestFuture<T> requestFuture, @Nullable T responseHandler) { try { myMessageHandler.removeFuture(messageId); if (responseHandler != null) { responseHandler.sessionTerminated(); } } finally { requestFuture.setDone(); } } | notifyTerminated |
2,972 | void (UUID sessionId) { final RequestFuture<T> future = removeFuture(sessionId); if (future != null) { final T handler = future.getMessageHandler(); try { if (handler != null) { try { handler.sessionTerminated(); } catch (Throwable e) { //noinspection CallToPrintStackTrace e.printStackTrace(); } } } finally { future.setDone(); } } } | terminateSession |
2,973 | void (UUID messageId, RequestFuture<T> requestFuture) { myHandlers.put(messageId, requestFuture); } | registerFuture |
2,974 | RequestFuture<T> (UUID messageId) { return myHandlers.remove(messageId); } | removeFuture |
2,975 | void ( com.google.protobuf.ExtensionRegistryLite registry) { } | registerAllExtensions |
2,976 | int () { return value; } | getNumber |
2,977 | Type (int value) { return forNumber(value); } | valueOf |
2,978 | Type (int value) { switch (value) { case 1: return CONTROLLER_MESSAGE; case 2: return BUILDER_MESSAGE; case 3: return FAILURE; default: return null; } } | forNumber |
2,979 | Type (int number) { return Type.forNumber(number); } | findValueByNumber |
2,980 | boolean (int number) { return Type.forNumber(number) != null; } | isInRange |
2,981 | boolean () { return ((bitField0_ & 0x00000001) != 0); } | hasMostSigBits |
2,982 | long () { return mostSigBits_; } | getMostSigBits |
2,983 | void (long value) { bitField0_ |= 0x00000001; mostSigBits_ = value; } | setMostSigBits |
2,984 | void () { bitField0_ = (bitField0_ & ~0x00000001); mostSigBits_ = 0L; } | clearMostSigBits |
2,985 | boolean () { return ((bitField0_ & 0x00000002) != 0); } | hasLeastSigBits |
2,986 | long () { return leastSigBits_; } | getLeastSigBits |
2,987 | void (long value) { bitField0_ |= 0x00000002; leastSigBits_ = value; } | setLeastSigBits |
2,988 | void () { bitField0_ = (bitField0_ & ~0x00000002); leastSigBits_ = 0L; } | clearLeastSigBits |
2,989 | Builder () { return (Builder) DEFAULT_INSTANCE.createBuilder(); } | newBuilder |
2,990 | Builder (org.jetbrains.jps.api.CmdlineRemoteProto.Message.UUID prototype) { return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); } | newBuilder |
2,991 | boolean () { return instance.hasMostSigBits(); } | hasMostSigBits |
2,992 | long () { return instance.getMostSigBits(); } | getMostSigBits |
2,993 | Builder (long value) { copyOnWrite(); instance.setMostSigBits(value); return this; } | setMostSigBits |
2,994 | Builder () { copyOnWrite(); instance.clearMostSigBits(); return this; } | clearMostSigBits |
2,995 | boolean () { return instance.hasLeastSigBits(); } | hasLeastSigBits |
2,996 | long () { return instance.getLeastSigBits(); } | getLeastSigBits |
2,997 | Builder (long value) { copyOnWrite(); instance.setLeastSigBits(value); return this; } | setLeastSigBits |
2,998 | Builder () { copyOnWrite(); instance.clearLeastSigBits(); return this; } | clearLeastSigBits |
2,999 | boolean () { return ((bitField0_ & 0x00000001) != 0); } | hasKey |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.