id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
65,200
census-instrumentation/opencensus-java
exporters/trace/zipkin/src/main/java/io/opencensus/exporter/trace/zipkin/ZipkinTraceExporter.java
ZipkinTraceExporter.unregister
public static void unregister() { synchronized (monitor) { checkState(handler != null, "Zipkin exporter is not registered."); unregister(Tracing.getExportComponent().getSpanExporter()); handler = null; } }
java
public static void unregister() { synchronized (monitor) { checkState(handler != null, "Zipkin exporter is not registered."); unregister(Tracing.getExportComponent().getSpanExporter()); handler = null; } }
[ "public", "static", "void", "unregister", "(", ")", "{", "synchronized", "(", "monitor", ")", "{", "checkState", "(", "handler", "!=", "null", ",", "\"Zipkin exporter is not registered.\"", ")", ";", "unregister", "(", "Tracing", ".", "getExportComponent", "(", ...
Unregisters the Zipkin Trace exporter from the OpenCensus library. @throws IllegalStateException if a Zipkin exporter is not registered. @since 0.12
[ "Unregisters", "the", "Zipkin", "Trace", "exporter", "from", "the", "OpenCensus", "library", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/exporters/trace/zipkin/src/main/java/io/opencensus/exporter/trace/zipkin/ZipkinTraceExporter.java#L106-L112
65,201
census-instrumentation/opencensus-java
contrib/spring_sleuth_v1x/src/main/java/io/opencensus/contrib/spring/sleuth/v1x/OpenCensusSleuthSpanContextHolder.java
OpenCensusSleuthSpanContextHolder.getCurrentSpan
@javax.annotation.Nullable static Span getCurrentSpan() { SpanContext currentSpanContext = CURRENT_SPAN.get(); return currentSpanContext != null ? currentSpanContext.span : null; }
java
@javax.annotation.Nullable static Span getCurrentSpan() { SpanContext currentSpanContext = CURRENT_SPAN.get(); return currentSpanContext != null ? currentSpanContext.span : null; }
[ "@", "javax", ".", "annotation", ".", "Nullable", "static", "Span", "getCurrentSpan", "(", ")", "{", "SpanContext", "currentSpanContext", "=", "CURRENT_SPAN", ".", "get", "(", ")", ";", "return", "currentSpanContext", "!=", "null", "?", "currentSpanContext", "."...
Get the current span out of the thread context.
[ "Get", "the", "current", "span", "out", "of", "the", "thread", "context", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/contrib/spring_sleuth_v1x/src/main/java/io/opencensus/contrib/spring/sleuth/v1x/OpenCensusSleuthSpanContextHolder.java#L39-L43
65,202
census-instrumentation/opencensus-java
contrib/spring_sleuth_v1x/src/main/java/io/opencensus/contrib/spring/sleuth/v1x/OpenCensusSleuthSpanContextHolder.java
OpenCensusSleuthSpanContextHolder.setCurrentSpan
static void setCurrentSpan(Span span) { if (log.isTraceEnabled()) { log.trace("Setting current span " + span); } push(span, /* autoClose= */ false); }
java
static void setCurrentSpan(Span span) { if (log.isTraceEnabled()) { log.trace("Setting current span " + span); } push(span, /* autoClose= */ false); }
[ "static", "void", "setCurrentSpan", "(", "Span", "span", ")", "{", "if", "(", "log", ".", "isTraceEnabled", "(", ")", ")", "{", "log", ".", "trace", "(", "\"Setting current span \"", "+", "span", ")", ";", "}", "push", "(", "span", ",", "/* autoClose= */...
Set the current span in the thread context
[ "Set", "the", "current", "span", "in", "the", "thread", "context" ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/contrib/spring_sleuth_v1x/src/main/java/io/opencensus/contrib/spring/sleuth/v1x/OpenCensusSleuthSpanContextHolder.java#L46-L51
65,203
census-instrumentation/opencensus-java
contrib/spring_sleuth_v1x/src/main/java/io/opencensus/contrib/spring/sleuth/v1x/OpenCensusSleuthSpanContextHolder.java
OpenCensusSleuthSpanContextHolder.close
static void close(SpanFunction spanFunction) { SpanContext current = CURRENT_SPAN.get(); while (current != null) { spanFunction.apply(current.span); current = removeCurrentSpanInternal(current.parent); if (current == null || !current.autoClose) { return; } } }
java
static void close(SpanFunction spanFunction) { SpanContext current = CURRENT_SPAN.get(); while (current != null) { spanFunction.apply(current.span); current = removeCurrentSpanInternal(current.parent); if (current == null || !current.autoClose) { return; } } }
[ "static", "void", "close", "(", "SpanFunction", "spanFunction", ")", "{", "SpanContext", "current", "=", "CURRENT_SPAN", ".", "get", "(", ")", ";", "while", "(", "current", "!=", "null", ")", "{", "spanFunction", ".", "apply", "(", "current", ".", "span", ...
will be applied on the closed Span.
[ "will", "be", "applied", "on", "the", "closed", "Span", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/contrib/spring_sleuth_v1x/src/main/java/io/opencensus/contrib/spring/sleuth/v1x/OpenCensusSleuthSpanContextHolder.java#L82-L91
65,204
census-instrumentation/opencensus-java
contrib/spring_sleuth_v1x/src/main/java/io/opencensus/contrib/spring/sleuth/v1x/OpenCensusSleuthSpanContextHolder.java
OpenCensusSleuthSpanContextHolder.push
static void push(Span span, boolean autoClose) { if (isCurrent(span)) { return; } setSpanContextInternal(new SpanContext(span, autoClose)); }
java
static void push(Span span, boolean autoClose) { if (isCurrent(span)) { return; } setSpanContextInternal(new SpanContext(span, autoClose)); }
[ "static", "void", "push", "(", "Span", "span", ",", "boolean", "autoClose", ")", "{", "if", "(", "isCurrent", "(", "span", ")", ")", "{", "return", ";", "}", "setSpanContextInternal", "(", "new", "SpanContext", "(", "span", ",", "autoClose", ")", ")", ...
Push a span into the thread context, with the option to have it auto close if any child spans are themselves closed. Use autoClose=true if you start a new span with a parent that wasn't already in thread context.
[ "Push", "a", "span", "into", "the", "thread", "context", "with", "the", "option", "to", "have", "it", "auto", "close", "if", "any", "child", "spans", "are", "themselves", "closed", ".", "Use", "autoClose", "=", "true", "if", "you", "start", "a", "new", ...
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/contrib/spring_sleuth_v1x/src/main/java/io/opencensus/contrib/spring/sleuth/v1x/OpenCensusSleuthSpanContextHolder.java#L103-L108
65,205
census-instrumentation/opencensus-java
examples/src/main/java/io/opencensus/examples/quickstart/Repl.java
Repl.main
public static void main(String... args) { // Step 1. Enable OpenCensus Metrics. try { setupOpenCensusAndPrometheusExporter(); } catch (IOException e) { System.err.println("Failed to create and register OpenCensus Prometheus Stats exporter " + e); return; } BufferedReader stdin = n...
java
public static void main(String... args) { // Step 1. Enable OpenCensus Metrics. try { setupOpenCensusAndPrometheusExporter(); } catch (IOException e) { System.err.println("Failed to create and register OpenCensus Prometheus Stats exporter " + e); return; } BufferedReader stdin = n...
[ "public", "static", "void", "main", "(", "String", "...", "args", ")", "{", "// Step 1. Enable OpenCensus Metrics.", "try", "{", "setupOpenCensusAndPrometheusExporter", "(", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "System", ".", "err", ".", ...
Main launcher for the Repl example.
[ "Main", "launcher", "for", "the", "Repl", "example", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/examples/src/main/java/io/opencensus/examples/quickstart/Repl.java#L71-L93
65,206
census-instrumentation/opencensus-java
api/src/main/java/io/opencensus/trace/Tracestate.java
Tracestate.get
@javax.annotation.Nullable public String get(String key) { for (Entry entry : getEntries()) { if (entry.getKey().equals(key)) { return entry.getValue(); } } return null; }
java
@javax.annotation.Nullable public String get(String key) { for (Entry entry : getEntries()) { if (entry.getKey().equals(key)) { return entry.getValue(); } } return null; }
[ "@", "javax", ".", "annotation", ".", "Nullable", "public", "String", "get", "(", "String", "key", ")", "{", "for", "(", "Entry", "entry", ":", "getEntries", "(", ")", ")", "{", "if", "(", "entry", ".", "getKey", "(", ")", ".", "equals", "(", "key"...
Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key. @param key with which the specified value is to be associated @return the value to which the specified key is mapped, or null if this map contains no mapping for the key. @since 0.16
[ "Returns", "the", "value", "to", "which", "the", "specified", "key", "is", "mapped", "or", "null", "if", "this", "map", "contains", "no", "mapping", "for", "the", "key", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/api/src/main/java/io/opencensus/trace/Tracestate.java#L59-L67
65,207
census-instrumentation/opencensus-java
api/src/main/java/io/opencensus/trace/Tracestate.java
Tracestate.validateValue
private static boolean validateValue(String value) { if (value.length() > VALUE_MAX_SIZE || value.charAt(value.length() - 1) == ' ' /* '\u0020' */) { return false; } for (int i = 0; i < value.length(); i++) { char c = value.charAt(i); if (c == ',' || c == '=' || c < ' ' /* '\u0020' */ || c...
java
private static boolean validateValue(String value) { if (value.length() > VALUE_MAX_SIZE || value.charAt(value.length() - 1) == ' ' /* '\u0020' */) { return false; } for (int i = 0; i < value.length(); i++) { char c = value.charAt(i); if (c == ',' || c == '=' || c < ' ' /* '\u0020' */ || c...
[ "private", "static", "boolean", "validateValue", "(", "String", "value", ")", "{", "if", "(", "value", ".", "length", "(", ")", ">", "VALUE_MAX_SIZE", "||", "value", ".", "charAt", "(", "value", ".", "length", "(", ")", "-", "1", ")", "==", "'", "'",...
0x20 to 0x7E) except comma , and =.
[ "0x20", "to", "0x7E", ")", "except", "comma", "and", "=", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/api/src/main/java/io/opencensus/trace/Tracestate.java#L254-L265
65,208
census-instrumentation/opencensus-java
benchmarks/src/jmh/java/io/opencensus/benchmarks/tags/NestedTagContextCreationBenchmark.java
NestedTagContextCreationBenchmark.timeNestedTagContext
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public TagContext timeNestedTagContext(Data data) { return TagsBenchmarksUtil.createTagContext( data.tagger.toBuilder(data.baseTagContext), data.numTags); }
java
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public TagContext timeNestedTagContext(Data data) { return TagsBenchmarksUtil.createTagContext( data.tagger.toBuilder(data.baseTagContext), data.numTags); }
[ "@", "Benchmark", "@", "BenchmarkMode", "(", "Mode", ".", "AverageTime", ")", "@", "OutputTimeUnit", "(", "TimeUnit", ".", "NANOSECONDS", ")", "public", "TagContext", "timeNestedTagContext", "(", "Data", "data", ")", "{", "return", "TagsBenchmarksUtil", ".", "cr...
Build nested tag context.
[ "Build", "nested", "tag", "context", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/benchmarks/src/jmh/java/io/opencensus/benchmarks/tags/NestedTagContextCreationBenchmark.java#L55-L61
65,209
census-instrumentation/opencensus-java
exporters/trace/jaeger/src/main/java/io/opencensus/exporter/trace/jaeger/JaegerTraceExporter.java
JaegerTraceExporter.createAndRegister
public static void createAndRegister(final String thriftEndpoint, final String serviceName) { synchronized (monitor) { checkState(handler == null, "Jaeger exporter is already registered."); final SpanExporter.Handler newHandler = newHandler(thriftEndpoint, serviceName); JaegerTraceExporter.handler...
java
public static void createAndRegister(final String thriftEndpoint, final String serviceName) { synchronized (monitor) { checkState(handler == null, "Jaeger exporter is already registered."); final SpanExporter.Handler newHandler = newHandler(thriftEndpoint, serviceName); JaegerTraceExporter.handler...
[ "public", "static", "void", "createAndRegister", "(", "final", "String", "thriftEndpoint", ",", "final", "String", "serviceName", ")", "{", "synchronized", "(", "monitor", ")", "{", "checkState", "(", "handler", "==", "null", ",", "\"Jaeger exporter is already regis...
Creates and registers the Jaeger Trace exporter to the OpenCensus library. Only one Jaeger exporter can be registered at any point. @param thriftEndpoint the Thrift endpoint of your Jaeger instance, e.g.: "http://127.0.0.1:14268/api/traces" @param serviceName the local service name of the process. @throws IllegalState...
[ "Creates", "and", "registers", "the", "Jaeger", "Trace", "exporter", "to", "the", "OpenCensus", "library", ".", "Only", "one", "Jaeger", "exporter", "can", "be", "registered", "at", "any", "point", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/exporters/trace/jaeger/src/main/java/io/opencensus/exporter/trace/jaeger/JaegerTraceExporter.java#L63-L70
65,210
census-instrumentation/opencensus-java
exporters/trace/jaeger/src/main/java/io/opencensus/exporter/trace/jaeger/JaegerTraceExporter.java
JaegerTraceExporter.createWithSender
public static void createWithSender(final ThriftSender sender, final String serviceName) { synchronized (monitor) { checkState(handler == null, "Jaeger exporter is already registered."); final SpanExporter.Handler newHandler = newHandlerWithSender(sender, serviceName); JaegerTraceExporter.handler ...
java
public static void createWithSender(final ThriftSender sender, final String serviceName) { synchronized (monitor) { checkState(handler == null, "Jaeger exporter is already registered."); final SpanExporter.Handler newHandler = newHandlerWithSender(sender, serviceName); JaegerTraceExporter.handler ...
[ "public", "static", "void", "createWithSender", "(", "final", "ThriftSender", "sender", ",", "final", "String", "serviceName", ")", "{", "synchronized", "(", "monitor", ")", "{", "checkState", "(", "handler", "==", "null", ",", "\"Jaeger exporter is already register...
Creates and registers the Jaeger Trace exporter to the OpenCensus library using the provided HttpSender. Only one Jaeger exporter can be registered at any point. @param sender the pre-configured ThriftSender to use with the exporter @param serviceName the local service name of the process. @throws IllegalStateExceptio...
[ "Creates", "and", "registers", "the", "Jaeger", "Trace", "exporter", "to", "the", "OpenCensus", "library", "using", "the", "provided", "HttpSender", ".", "Only", "one", "Jaeger", "exporter", "can", "be", "registered", "at", "any", "point", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/exporters/trace/jaeger/src/main/java/io/opencensus/exporter/trace/jaeger/JaegerTraceExporter.java#L81-L88
65,211
census-instrumentation/opencensus-java
examples/src/main/java/io/opencensus/examples/grpc/helloworld/HelloWorldServer.java
HelloWorldServer.performWork
private static void performWork(Span parent) { SpanBuilder spanBuilder = tracer .spanBuilderWithExplicitParent("internal_work", parent) .setRecordEvents(true) .setSampler(Samplers.alwaysSample()); try (Scope scope = spanBuilder.startScopedSpan()) { Span span = t...
java
private static void performWork(Span parent) { SpanBuilder spanBuilder = tracer .spanBuilderWithExplicitParent("internal_work", parent) .setRecordEvents(true) .setSampler(Samplers.alwaysSample()); try (Scope scope = spanBuilder.startScopedSpan()) { Span span = t...
[ "private", "static", "void", "performWork", "(", "Span", "parent", ")", "{", "SpanBuilder", "spanBuilder", "=", "tracer", ".", "spanBuilderWithExplicitParent", "(", "\"internal_work\"", ",", "parent", ")", ".", "setRecordEvents", "(", "true", ")", ".", "setSampler...
A helper function that performs some work in its own Span.
[ "A", "helper", "function", "that", "performs", "some", "work", "in", "its", "own", "Span", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/examples/src/main/java/io/opencensus/examples/grpc/helloworld/HelloWorldServer.java#L61-L74
65,212
census-instrumentation/opencensus-java
contrib/zpages/src/main/java/io/opencensus/contrib/zpages/TraceConfigzZPageHandler.java
TraceConfigzZPageHandler.emitTraceParamsTable
@SuppressWarnings("deprecation") private static void emitTraceParamsTable(TraceParams params, PrintWriter out) { out.write( "<b class=\"title\">Active tracing parameters:</b><br>\n" + "<table class=\"small\" rules=\"all\">\n" + " <tr>\n" + " <td class=\"col_headR\">...
java
@SuppressWarnings("deprecation") private static void emitTraceParamsTable(TraceParams params, PrintWriter out) { out.write( "<b class=\"title\">Active tracing parameters:</b><br>\n" + "<table class=\"small\" rules=\"all\">\n" + " <tr>\n" + " <td class=\"col_headR\">...
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "private", "static", "void", "emitTraceParamsTable", "(", "TraceParams", "params", ",", "PrintWriter", "out", ")", "{", "out", ".", "write", "(", "\"<b class=\\\"title\\\">Active tracing parameters:</b><br>\\n\"", "+",...
Prints a table to a PrintWriter that shows existing trace parameters.
[ "Prints", "a", "table", "to", "a", "PrintWriter", "that", "shows", "existing", "trace", "parameters", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/contrib/zpages/src/main/java/io/opencensus/contrib/zpages/TraceConfigzZPageHandler.java#L192-L218
65,213
census-instrumentation/opencensus-java
benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/RecordTraceEventsBenchmark.java
RecordTraceEventsBenchmark.putAttribute
@Benchmark @BenchmarkMode(Mode.SampleTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public Span putAttribute(Data data) { data.span.putAttribute(ATTRIBUTE_KEY, AttributeValue.stringAttributeValue(ATTRIBUTE_VALUE)); return data.span; }
java
@Benchmark @BenchmarkMode(Mode.SampleTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public Span putAttribute(Data data) { data.span.putAttribute(ATTRIBUTE_KEY, AttributeValue.stringAttributeValue(ATTRIBUTE_VALUE)); return data.span; }
[ "@", "Benchmark", "@", "BenchmarkMode", "(", "Mode", ".", "SampleTime", ")", "@", "OutputTimeUnit", "(", "TimeUnit", ".", "NANOSECONDS", ")", "public", "Span", "putAttribute", "(", "Data", "data", ")", "{", "data", ".", "span", ".", "putAttribute", "(", "A...
This benchmark attempts to measure performance of adding an attribute to the span.
[ "This", "benchmark", "attempts", "to", "measure", "performance", "of", "adding", "an", "attribute", "to", "the", "span", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/RecordTraceEventsBenchmark.java#L84-L90
65,214
census-instrumentation/opencensus-java
benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/RecordTraceEventsBenchmark.java
RecordTraceEventsBenchmark.addAnnotation
@Benchmark @BenchmarkMode(Mode.SampleTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public Span addAnnotation(Data data) { data.span.addAnnotation(ANNOTATION_DESCRIPTION); return data.span; }
java
@Benchmark @BenchmarkMode(Mode.SampleTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public Span addAnnotation(Data data) { data.span.addAnnotation(ANNOTATION_DESCRIPTION); return data.span; }
[ "@", "Benchmark", "@", "BenchmarkMode", "(", "Mode", ".", "SampleTime", ")", "@", "OutputTimeUnit", "(", "TimeUnit", ".", "NANOSECONDS", ")", "public", "Span", "addAnnotation", "(", "Data", "data", ")", "{", "data", ".", "span", ".", "addAnnotation", "(", ...
This benchmark attempts to measure performance of adding an annotation to the span.
[ "This", "benchmark", "attempts", "to", "measure", "performance", "of", "adding", "an", "annotation", "to", "the", "span", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/RecordTraceEventsBenchmark.java#L93-L99
65,215
census-instrumentation/opencensus-java
benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/RecordTraceEventsBenchmark.java
RecordTraceEventsBenchmark.addMessageEvent
@Benchmark @BenchmarkMode(Mode.SampleTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public Span addMessageEvent(Data data) { data.span.addMessageEvent( io.opencensus.trace.MessageEvent.builder(Type.RECEIVED, 1) .setUncompressedMessageSize(3) .build()); return data.span; }
java
@Benchmark @BenchmarkMode(Mode.SampleTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public Span addMessageEvent(Data data) { data.span.addMessageEvent( io.opencensus.trace.MessageEvent.builder(Type.RECEIVED, 1) .setUncompressedMessageSize(3) .build()); return data.span; }
[ "@", "Benchmark", "@", "BenchmarkMode", "(", "Mode", ".", "SampleTime", ")", "@", "OutputTimeUnit", "(", "TimeUnit", ".", "NANOSECONDS", ")", "public", "Span", "addMessageEvent", "(", "Data", "data", ")", "{", "data", ".", "span", ".", "addMessageEvent", "("...
This benchmark attempts to measure performance of adding a network event to the span.
[ "This", "benchmark", "attempts", "to", "measure", "performance", "of", "adding", "a", "network", "event", "to", "the", "span", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/RecordTraceEventsBenchmark.java#L102-L111
65,216
census-instrumentation/opencensus-java
benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/RecordTraceEventsBenchmark.java
RecordTraceEventsBenchmark.addLink
@Benchmark @BenchmarkMode(Mode.SampleTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public Span addLink(Data data) { data.span.addLink( Link.fromSpanContext(data.linkedSpan.getContext(), Link.Type.PARENT_LINKED_SPAN)); return data.span; }
java
@Benchmark @BenchmarkMode(Mode.SampleTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public Span addLink(Data data) { data.span.addLink( Link.fromSpanContext(data.linkedSpan.getContext(), Link.Type.PARENT_LINKED_SPAN)); return data.span; }
[ "@", "Benchmark", "@", "BenchmarkMode", "(", "Mode", ".", "SampleTime", ")", "@", "OutputTimeUnit", "(", "TimeUnit", ".", "NANOSECONDS", ")", "public", "Span", "addLink", "(", "Data", "data", ")", "{", "data", ".", "span", ".", "addLink", "(", "Link", "....
This benchmark attempts to measure performance of adding a link to the span.
[ "This", "benchmark", "attempts", "to", "measure", "performance", "of", "adding", "a", "link", "to", "the", "span", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/RecordTraceEventsBenchmark.java#L114-L121
65,217
census-instrumentation/opencensus-java
exporters/metrics/ocagent/src/main/java/io/opencensus/exporter/metrics/ocagent/OcAgentMetricsServiceExportRpcHandler.java
OcAgentMetricsServiceExportRpcHandler.create
static OcAgentMetricsServiceExportRpcHandler create(MetricsServiceStub stub) { OcAgentMetricsServiceExportRpcHandler exportRpcHandler = new OcAgentMetricsServiceExportRpcHandler(); ExportResponseObserver exportResponseObserver = new ExportResponseObserver(exportRpcHandler); try { StreamObserve...
java
static OcAgentMetricsServiceExportRpcHandler create(MetricsServiceStub stub) { OcAgentMetricsServiceExportRpcHandler exportRpcHandler = new OcAgentMetricsServiceExportRpcHandler(); ExportResponseObserver exportResponseObserver = new ExportResponseObserver(exportRpcHandler); try { StreamObserve...
[ "static", "OcAgentMetricsServiceExportRpcHandler", "create", "(", "MetricsServiceStub", "stub", ")", "{", "OcAgentMetricsServiceExportRpcHandler", "exportRpcHandler", "=", "new", "OcAgentMetricsServiceExportRpcHandler", "(", ")", ";", "ExportResponseObserver", "exportResponseObserv...
given MetricsServiceStub.
[ "given", "MetricsServiceStub", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/exporters/metrics/ocagent/src/main/java/io/opencensus/exporter/metrics/ocagent/OcAgentMetricsServiceExportRpcHandler.java#L58-L70
65,218
census-instrumentation/opencensus-java
api/src/main/java/io/opencensus/common/Timestamp.java
Timestamp.create
public static Timestamp create(long seconds, int nanos) { if (seconds < -MAX_SECONDS) { throw new IllegalArgumentException( "'seconds' is less than minimum (" + -MAX_SECONDS + "): " + seconds); } if (seconds > MAX_SECONDS) { throw new IllegalArgumentException( "'seconds' is g...
java
public static Timestamp create(long seconds, int nanos) { if (seconds < -MAX_SECONDS) { throw new IllegalArgumentException( "'seconds' is less than minimum (" + -MAX_SECONDS + "): " + seconds); } if (seconds > MAX_SECONDS) { throw new IllegalArgumentException( "'seconds' is g...
[ "public", "static", "Timestamp", "create", "(", "long", "seconds", ",", "int", "nanos", ")", "{", "if", "(", "seconds", "<", "-", "MAX_SECONDS", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"'seconds' is less than minimum (\"", "+", "-", "MAX_SEC...
Creates a new timestamp from given seconds and nanoseconds. @param seconds Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. @param nanos Non-negative fractions of a second at nanosecond resolution. Negative second values wit...
[ "Creates", "a", "new", "timestamp", "from", "given", "seconds", "and", "nanoseconds", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/api/src/main/java/io/opencensus/common/Timestamp.java#L57-L74
65,219
census-instrumentation/opencensus-java
api/src/main/java/io/opencensus/common/Timestamp.java
Timestamp.fromMillis
public static Timestamp fromMillis(long epochMilli) { long secs = floorDiv(epochMilli, MILLIS_PER_SECOND); int mos = (int) floorMod(epochMilli, MILLIS_PER_SECOND); return create(secs, (int) (mos * NANOS_PER_MILLI)); // Safe int * NANOS_PER_MILLI }
java
public static Timestamp fromMillis(long epochMilli) { long secs = floorDiv(epochMilli, MILLIS_PER_SECOND); int mos = (int) floorMod(epochMilli, MILLIS_PER_SECOND); return create(secs, (int) (mos * NANOS_PER_MILLI)); // Safe int * NANOS_PER_MILLI }
[ "public", "static", "Timestamp", "fromMillis", "(", "long", "epochMilli", ")", "{", "long", "secs", "=", "floorDiv", "(", "epochMilli", ",", "MILLIS_PER_SECOND", ")", ";", "int", "mos", "=", "(", "int", ")", "floorMod", "(", "epochMilli", ",", "MILLIS_PER_SE...
Creates a new timestamp from the given milliseconds. @param epochMilli the timestamp represented in milliseconds since epoch. @return new {@code Timestamp} with specified fields. @throws IllegalArgumentException if the number of milliseconds is out of the range that can be represented by {@code Timestamp}. @since 0.5
[ "Creates", "a", "new", "timestamp", "from", "the", "given", "milliseconds", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/api/src/main/java/io/opencensus/common/Timestamp.java#L85-L89
65,220
census-instrumentation/opencensus-java
api/src/main/java/io/opencensus/common/Timestamp.java
Timestamp.plus
private Timestamp plus(long secondsToAdd, long nanosToAdd) { if ((secondsToAdd | nanosToAdd) == 0) { return this; } long epochSec = TimeUtils.checkedAdd(getSeconds(), secondsToAdd); epochSec = TimeUtils.checkedAdd(epochSec, nanosToAdd / NANOS_PER_SECOND); nanosToAdd = nanosToAdd % NANOS_PER_SE...
java
private Timestamp plus(long secondsToAdd, long nanosToAdd) { if ((secondsToAdd | nanosToAdd) == 0) { return this; } long epochSec = TimeUtils.checkedAdd(getSeconds(), secondsToAdd); epochSec = TimeUtils.checkedAdd(epochSec, nanosToAdd / NANOS_PER_SECOND); nanosToAdd = nanosToAdd % NANOS_PER_SE...
[ "private", "Timestamp", "plus", "(", "long", "secondsToAdd", ",", "long", "nanosToAdd", ")", "{", "if", "(", "(", "secondsToAdd", "|", "nanosToAdd", ")", "==", "0", ")", "{", "return", "this", ";", "}", "long", "epochSec", "=", "TimeUtils", ".", "checked...
Returns a Timestamp with the specified duration added.
[ "Returns", "a", "Timestamp", "with", "the", "specified", "duration", "added", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/api/src/main/java/io/opencensus/common/Timestamp.java#L172-L181
65,221
census-instrumentation/opencensus-java
api/src/main/java/io/opencensus/common/Timestamp.java
Timestamp.floorDiv
private static long floorDiv(long x, long y) { return BigDecimal.valueOf(x).divide(BigDecimal.valueOf(y), 0, RoundingMode.FLOOR).longValue(); }
java
private static long floorDiv(long x, long y) { return BigDecimal.valueOf(x).divide(BigDecimal.valueOf(y), 0, RoundingMode.FLOOR).longValue(); }
[ "private", "static", "long", "floorDiv", "(", "long", "x", ",", "long", "y", ")", "{", "return", "BigDecimal", ".", "valueOf", "(", "x", ")", ".", "divide", "(", "BigDecimal", ".", "valueOf", "(", "y", ")", ",", "0", ",", "RoundingMode", ".", "FLOOR"...
Returns the result of dividing x by y rounded using floor.
[ "Returns", "the", "result", "of", "dividing", "x", "by", "y", "rounded", "using", "floor", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/api/src/main/java/io/opencensus/common/Timestamp.java#L192-L194
65,222
census-instrumentation/opencensus-java
contrib/resource_util/src/main/java/io/opencensus/contrib/resource/util/AwsIdentityDocUtils.java
AwsIdentityDocUtils.initializeAwsIdentityDocument
private static Map<String, String> initializeAwsIdentityDocument() { InputStream stream = null; try { stream = openStream(AWS_INSTANCE_IDENTITY_DOCUMENT_URI); String awsIdentityDocument = slurp(new InputStreamReader(stream, Charset.forName("UTF-8"))); return parseAwsIdentityDocument(awsIdentit...
java
private static Map<String, String> initializeAwsIdentityDocument() { InputStream stream = null; try { stream = openStream(AWS_INSTANCE_IDENTITY_DOCUMENT_URI); String awsIdentityDocument = slurp(new InputStreamReader(stream, Charset.forName("UTF-8"))); return parseAwsIdentityDocument(awsIdentit...
[ "private", "static", "Map", "<", "String", ",", "String", ">", "initializeAwsIdentityDocument", "(", ")", "{", "InputStream", "stream", "=", "null", ";", "try", "{", "stream", "=", "openStream", "(", "AWS_INSTANCE_IDENTITY_DOCUMENT_URI", ")", ";", "String", "aws...
This method should only be called once.
[ "This", "method", "should", "only", "be", "called", "once", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/contrib/resource_util/src/main/java/io/opencensus/contrib/resource/util/AwsIdentityDocUtils.java#L53-L72
65,223
census-instrumentation/opencensus-java
impl_core/src/main/java/io/opencensus/implcore/stats/MeasureToViewMap.java
MeasureToViewMap.filterExportedViews
private static Set<View> filterExportedViews(Collection<View> allViews) { Set<View> views = Sets.newHashSet(); for (View view : allViews) { if (view.getWindow() instanceof View.AggregationWindow.Cumulative) { views.add(view); } } return Collections.unmodifiableSet(views); }
java
private static Set<View> filterExportedViews(Collection<View> allViews) { Set<View> views = Sets.newHashSet(); for (View view : allViews) { if (view.getWindow() instanceof View.AggregationWindow.Cumulative) { views.add(view); } } return Collections.unmodifiableSet(views); }
[ "private", "static", "Set", "<", "View", ">", "filterExportedViews", "(", "Collection", "<", "View", ">", "allViews", ")", "{", "Set", "<", "View", ">", "views", "=", "Sets", ".", "newHashSet", "(", ")", ";", "for", "(", "View", "view", ":", "allViews"...
Returns the subset of the given views that should be exported
[ "Returns", "the", "subset", "of", "the", "given", "views", "that", "should", "be", "exported" ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/impl_core/src/main/java/io/opencensus/implcore/stats/MeasureToViewMap.java#L89-L97
65,224
census-instrumentation/opencensus-java
impl_core/src/main/java/io/opencensus/implcore/stats/MeasureToViewMap.java
MeasureToViewMap.record
synchronized void record(TagContext tags, MeasureMapInternal stats, Timestamp timestamp) { Iterator<Measurement> iterator = stats.iterator(); Map<String, AttachmentValue> attachments = stats.getAttachments(); while (iterator.hasNext()) { Measurement measurement = iterator.next(); Measure measure...
java
synchronized void record(TagContext tags, MeasureMapInternal stats, Timestamp timestamp) { Iterator<Measurement> iterator = stats.iterator(); Map<String, AttachmentValue> attachments = stats.getAttachments(); while (iterator.hasNext()) { Measurement measurement = iterator.next(); Measure measure...
[ "synchronized", "void", "record", "(", "TagContext", "tags", ",", "MeasureMapInternal", "stats", ",", "Timestamp", "timestamp", ")", "{", "Iterator", "<", "Measurement", ">", "iterator", "=", "stats", ".", "iterator", "(", ")", ";", "Map", "<", "String", ","...
Records stats with a set of tags.
[ "Records", "stats", "with", "a", "set", "of", "tags", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/impl_core/src/main/java/io/opencensus/implcore/stats/MeasureToViewMap.java#L148-L164
65,225
census-instrumentation/opencensus-java
impl_core/src/main/java/io/opencensus/implcore/stats/MeasureToViewMap.java
MeasureToViewMap.clearStats
synchronized void clearStats() { for (Entry<String, Collection<MutableViewData>> entry : mutableMap.asMap().entrySet()) { for (MutableViewData mutableViewData : entry.getValue()) { mutableViewData.clearStats(); } } }
java
synchronized void clearStats() { for (Entry<String, Collection<MutableViewData>> entry : mutableMap.asMap().entrySet()) { for (MutableViewData mutableViewData : entry.getValue()) { mutableViewData.clearStats(); } } }
[ "synchronized", "void", "clearStats", "(", ")", "{", "for", "(", "Entry", "<", "String", ",", "Collection", "<", "MutableViewData", ">", ">", "entry", ":", "mutableMap", ".", "asMap", "(", ")", ".", "entrySet", "(", ")", ")", "{", "for", "(", "MutableV...
Clear stats for all the current MutableViewData
[ "Clear", "stats", "for", "all", "the", "current", "MutableViewData" ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/impl_core/src/main/java/io/opencensus/implcore/stats/MeasureToViewMap.java#L179-L185
65,226
census-instrumentation/opencensus-java
impl_core/src/main/java/io/opencensus/implcore/stats/MeasureToViewMap.java
MeasureToViewMap.resumeStatsCollection
synchronized void resumeStatsCollection(Timestamp now) { for (Entry<String, Collection<MutableViewData>> entry : mutableMap.asMap().entrySet()) { for (MutableViewData mutableViewData : entry.getValue()) { mutableViewData.resumeStatsCollection(now); } } }
java
synchronized void resumeStatsCollection(Timestamp now) { for (Entry<String, Collection<MutableViewData>> entry : mutableMap.asMap().entrySet()) { for (MutableViewData mutableViewData : entry.getValue()) { mutableViewData.resumeStatsCollection(now); } } }
[ "synchronized", "void", "resumeStatsCollection", "(", "Timestamp", "now", ")", "{", "for", "(", "Entry", "<", "String", ",", "Collection", "<", "MutableViewData", ">", ">", "entry", ":", "mutableMap", ".", "asMap", "(", ")", ".", "entrySet", "(", ")", ")",...
Resume stats collection for all MutableViewData.
[ "Resume", "stats", "collection", "for", "all", "MutableViewData", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/impl_core/src/main/java/io/opencensus/implcore/stats/MeasureToViewMap.java#L188-L194
65,227
census-instrumentation/opencensus-java
exporters/metrics/ocagent/src/main/java/io/opencensus/exporter/metrics/ocagent/OcAgentNodeUtils.java
OcAgentNodeUtils.getProcessIdentifier
@VisibleForTesting static ProcessIdentifier getProcessIdentifier(String jvmName, Timestamp censusTimestamp) { String hostname; int pid; // jvmName should be something like '<pid>@<hostname>', at least in Oracle and OpenJdk JVMs int delimiterIndex = jvmName.indexOf('@'); if (delimiterIndex < 1) { ...
java
@VisibleForTesting static ProcessIdentifier getProcessIdentifier(String jvmName, Timestamp censusTimestamp) { String hostname; int pid; // jvmName should be something like '<pid>@<hostname>', at least in Oracle and OpenJdk JVMs int delimiterIndex = jvmName.indexOf('@'); if (delimiterIndex < 1) { ...
[ "@", "VisibleForTesting", "static", "ProcessIdentifier", "getProcessIdentifier", "(", "String", "jvmName", ",", "Timestamp", "censusTimestamp", ")", "{", "String", "hostname", ";", "int", "pid", ";", "// jvmName should be something like '<pid>@<hostname>', at least in Oracle an...
Creates process identifier with the given JVM name and start time.
[ "Creates", "process", "identifier", "with", "the", "given", "JVM", "name", "and", "start", "time", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/exporters/metrics/ocagent/src/main/java/io/opencensus/exporter/metrics/ocagent/OcAgentNodeUtils.java#L60-L90
65,228
census-instrumentation/opencensus-java
examples/src/main/java/io/opencensus/examples/ocagent/OcAgentExportersQuickStart.java
OcAgentExportersQuickStart.main
public static void main(String[] args) throws InterruptedException { configureAlwaysSample(); // Always sample for demo purpose. DO NOT use in production. registerAllViews(); LongGauge gauge = registerGauge(); String endPoint = getStringOrDefaultFromArgs(args, 0, DEFAULT_ENDPOINT); registerAgentExp...
java
public static void main(String[] args) throws InterruptedException { configureAlwaysSample(); // Always sample for demo purpose. DO NOT use in production. registerAllViews(); LongGauge gauge = registerGauge(); String endPoint = getStringOrDefaultFromArgs(args, 0, DEFAULT_ENDPOINT); registerAgentExp...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "InterruptedException", "{", "configureAlwaysSample", "(", ")", ";", "// Always sample for demo purpose. DO NOT use in production.", "registerAllViews", "(", ")", ";", "LongGauge", "gaug...
Main launcher of the example.
[ "Main", "launcher", "of", "the", "example", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/examples/src/main/java/io/opencensus/examples/ocagent/OcAgentExportersQuickStart.java#L173-L192
65,229
census-instrumentation/opencensus-java
impl_core/src/main/java/io/opencensus/implcore/internal/CurrentState.java
CurrentState.get
public State get() { InternalState internalState = currentInternalState.get(); while (!internalState.isRead) { // Slow path, the state is first time read. Change the state only if no other changes // happened between the moment initialState is read and this moment. This ensures that this // me...
java
public State get() { InternalState internalState = currentInternalState.get(); while (!internalState.isRead) { // Slow path, the state is first time read. Change the state only if no other changes // happened between the moment initialState is read and this moment. This ensures that this // me...
[ "public", "State", "get", "(", ")", "{", "InternalState", "internalState", "=", "currentInternalState", ".", "get", "(", ")", ";", "while", "(", "!", "internalState", ".", "isRead", ")", "{", "// Slow path, the state is first time read. Change the state only if no other...
Returns the current state and updates the status as being read. @return the current state and updates the status as being read.
[ "Returns", "the", "current", "state", "and", "updates", "the", "status", "as", "being", "read", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/impl_core/src/main/java/io/opencensus/implcore/internal/CurrentState.java#L79-L93
65,230
census-instrumentation/opencensus-java
impl_core/src/main/java/io/opencensus/implcore/internal/CurrentState.java
CurrentState.set
public boolean set(State state) { while (true) { InternalState internalState = currentInternalState.get(); checkState(!internalState.isRead, "State was already read, cannot set state."); if (state == internalState.state) { return false; } else { if (!currentInternalState.comp...
java
public boolean set(State state) { while (true) { InternalState internalState = currentInternalState.get(); checkState(!internalState.isRead, "State was already read, cannot set state."); if (state == internalState.state) { return false; } else { if (!currentInternalState.comp...
[ "public", "boolean", "set", "(", "State", "state", ")", "{", "while", "(", "true", ")", "{", "InternalState", "internalState", "=", "currentInternalState", ".", "get", "(", ")", ";", "checkState", "(", "!", "internalState", ".", "isRead", ",", "\"State was a...
Sets current state to the given state. Returns true if the current state is changed, false otherwise. @param state the state to be set. @return true if the current state is changed, false otherwise.
[ "Sets", "current", "state", "to", "the", "given", "state", ".", "Returns", "true", "if", "the", "current", "state", "is", "changed", "false", "otherwise", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/impl_core/src/main/java/io/opencensus/implcore/internal/CurrentState.java#L111-L130
65,231
census-instrumentation/opencensus-java
impl_core/src/main/java/io/opencensus/implcore/tags/propagation/CorrelationContextFormat.java
CorrelationContextFormat.encodeTag
private static int encodeTag(Tag tag, StringBuilder stringBuilder) { String key = tag.getKey().getName(); String value = tag.getValue().asString(); int charsOfTag = key.length() + value.length(); // This should never happen with our current constraints (<= 255 chars) on tags. checkArgument( ...
java
private static int encodeTag(Tag tag, StringBuilder stringBuilder) { String key = tag.getKey().getName(); String value = tag.getValue().asString(); int charsOfTag = key.length() + value.length(); // This should never happen with our current constraints (<= 255 chars) on tags. checkArgument( ...
[ "private", "static", "int", "encodeTag", "(", "Tag", "tag", ",", "StringBuilder", "stringBuilder", ")", "{", "String", "key", "=", "tag", ".", "getKey", "(", ")", ".", "getName", "(", ")", ";", "String", "value", "=", "tag", ".", "getValue", "(", ")", ...
Encodes the tag to the given string builder, and returns the length of encoded key-value pair.
[ "Encodes", "the", "tag", "to", "the", "given", "string", "builder", "and", "returns", "the", "length", "of", "encoded", "key", "-", "value", "pair", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/impl_core/src/main/java/io/opencensus/implcore/tags/propagation/CorrelationContextFormat.java#L127-L139
65,232
census-instrumentation/opencensus-java
impl_core/src/main/java/io/opencensus/implcore/tags/propagation/CorrelationContextFormat.java
CorrelationContextFormat.decodeTag
private static void decodeTag(String stringTag, Map<TagKey, TagValueWithMetadata> tags) { String keyWithValue; int firstPropertyIndex = stringTag.indexOf(TAG_PROPERTIES_DELIMITER); if (firstPropertyIndex != -1) { // Tag with properties. keyWithValue = stringTag.substring(0, firstPropertyIndex); ...
java
private static void decodeTag(String stringTag, Map<TagKey, TagValueWithMetadata> tags) { String keyWithValue; int firstPropertyIndex = stringTag.indexOf(TAG_PROPERTIES_DELIMITER); if (firstPropertyIndex != -1) { // Tag with properties. keyWithValue = stringTag.substring(0, firstPropertyIndex); ...
[ "private", "static", "void", "decodeTag", "(", "String", "stringTag", ",", "Map", "<", "TagKey", ",", "TagValueWithMetadata", ">", "tags", ")", "{", "String", "keyWithValue", ";", "int", "firstPropertyIndex", "=", "stringTag", ".", "indexOf", "(", "TAG_PROPERTIE...
The format of encoded string tag is name1=value1;properties1=p1;properties2=p2.
[ "The", "format", "of", "encoded", "string", "tag", "is", "name1", "=", "value1", ";", "properties1", "=", "p1", ";", "properties2", "=", "p2", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/impl_core/src/main/java/io/opencensus/implcore/tags/propagation/CorrelationContextFormat.java#L171-L187
65,233
census-instrumentation/opencensus-java
contrib/zpages/src/main/java/io/opencensus/contrib/zpages/TracezZPageHandler.java
TracezZPageHandler.emitSpans
private static void emitSpans(PrintWriter out, Formatter formatter, Collection<SpanData> spans) { out.write("<pre>\n"); formatter.format("%-23s %18s%n", "When", "Elapsed(s)"); out.write("-------------------------------------------\n"); for (SpanData span : spans) { tracer .getCurrentSpan...
java
private static void emitSpans(PrintWriter out, Formatter formatter, Collection<SpanData> spans) { out.write("<pre>\n"); formatter.format("%-23s %18s%n", "When", "Elapsed(s)"); out.write("-------------------------------------------\n"); for (SpanData span : spans) { tracer .getCurrentSpan...
[ "private", "static", "void", "emitSpans", "(", "PrintWriter", "out", ",", "Formatter", "formatter", ",", "Collection", "<", "SpanData", ">", "spans", ")", "{", "out", ".", "write", "(", "\"<pre>\\n\"", ")", ";", "formatter", ".", "format", "(", "\"%-23s %18s...
Emits the list of SampledRequets with a header.
[ "Emits", "the", "list", "of", "SampledRequets", "with", "a", "header", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/contrib/zpages/src/main/java/io/opencensus/contrib/zpages/TracezZPageHandler.java#L281-L302
65,234
census-instrumentation/opencensus-java
contrib/zpages/src/main/java/io/opencensus/contrib/zpages/TracezZPageHandler.java
TracezZPageHandler.emitSummaryTable
private void emitSummaryTable(PrintWriter out, Formatter formatter) throws UnsupportedEncodingException { if (runningSpanStore == null || sampledSpanStore == null) { return; } RunningSpanStore.Summary runningSpanStoreSummary = runningSpanStore.getSummary(); SampledSpanStore.Summary sampledSp...
java
private void emitSummaryTable(PrintWriter out, Formatter formatter) throws UnsupportedEncodingException { if (runningSpanStore == null || sampledSpanStore == null) { return; } RunningSpanStore.Summary runningSpanStoreSummary = runningSpanStore.getSummary(); SampledSpanStore.Summary sampledSp...
[ "private", "void", "emitSummaryTable", "(", "PrintWriter", "out", ",", "Formatter", "formatter", ")", "throws", "UnsupportedEncodingException", "{", "if", "(", "runningSpanStore", "==", "null", "||", "sampledSpanStore", "==", "null", ")", "{", "return", ";", "}", ...
Emits the summary table with links to all samples.
[ "Emits", "the", "summary", "table", "with", "links", "to", "all", "samples", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/contrib/zpages/src/main/java/io/opencensus/contrib/zpages/TracezZPageHandler.java#L416-L499
65,235
census-instrumentation/opencensus-java
impl_core/src/main/java/io/opencensus/implcore/internal/VarInt.java
VarInt.getVarInt
public static int getVarInt(byte[] src, int offset, int[] dst) { int result = 0; int shift = 0; int b; do { if (shift >= 32) { // Out of range throw new IndexOutOfBoundsException("varint too long"); } // Get 7 bits from next byte b = src[offset++]; result |=...
java
public static int getVarInt(byte[] src, int offset, int[] dst) { int result = 0; int shift = 0; int b; do { if (shift >= 32) { // Out of range throw new IndexOutOfBoundsException("varint too long"); } // Get 7 bits from next byte b = src[offset++]; result |=...
[ "public", "static", "int", "getVarInt", "(", "byte", "[", "]", "src", ",", "int", "offset", ",", "int", "[", "]", "dst", ")", "{", "int", "result", "=", "0", ";", "int", "shift", "=", "0", ";", "int", "b", ";", "do", "{", "if", "(", "shift", ...
Reads a varint from src, places its values into the first element of dst and returns the offset in to src of the first byte after the varint. @param src source buffer to retrieve from @param offset offset within src @param dst the resulting int value @return the updated offset after reading the varint
[ "Reads", "a", "varint", "from", "src", "places", "its", "values", "into", "the", "first", "element", "of", "dst", "and", "returns", "the", "offset", "in", "to", "src", "of", "the", "first", "byte", "after", "the", "varint", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/impl_core/src/main/java/io/opencensus/implcore/internal/VarInt.java#L61-L77
65,236
census-instrumentation/opencensus-java
impl_core/src/main/java/io/opencensus/implcore/internal/VarInt.java
VarInt.getVarInt
public static int getVarInt(ByteBuffer src) { int tmp; if ((tmp = src.get()) >= 0) { return tmp; } int result = tmp & 0x7f; if ((tmp = src.get()) >= 0) { result |= tmp << 7; } else { result |= (tmp & 0x7f) << 7; if ((tmp = src.get()) >= 0) { result |= tmp << 14; ...
java
public static int getVarInt(ByteBuffer src) { int tmp; if ((tmp = src.get()) >= 0) { return tmp; } int result = tmp & 0x7f; if ((tmp = src.get()) >= 0) { result |= tmp << 7; } else { result |= (tmp & 0x7f) << 7; if ((tmp = src.get()) >= 0) { result |= tmp << 14; ...
[ "public", "static", "int", "getVarInt", "(", "ByteBuffer", "src", ")", "{", "int", "tmp", ";", "if", "(", "(", "tmp", "=", "src", ".", "get", "(", ")", ")", ">=", "0", ")", "{", "return", "tmp", ";", "}", "int", "result", "=", "tmp", "&", "0x7f...
Reads a varint from the current position of the given ByteBuffer and returns the decoded value as 32 bit integer. <p>The position of the buffer is advanced to the first byte after the decoded varint. @param src the ByteBuffer to get the var int from @return The integer value of the decoded varint
[ "Reads", "a", "varint", "from", "the", "current", "position", "of", "the", "given", "ByteBuffer", "and", "returns", "the", "decoded", "value", "as", "32", "bit", "integer", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/impl_core/src/main/java/io/opencensus/implcore/internal/VarInt.java#L108-L137
65,237
census-instrumentation/opencensus-java
impl_core/src/main/java/io/opencensus/implcore/internal/VarInt.java
VarInt.putVarInt
public static void putVarInt(int v, ByteBuffer sink) { while (true) { int bits = v & 0x7f; v >>>= 7; if (v == 0) { sink.put((byte) bits); return; } sink.put((byte) (bits | 0x80)); } }
java
public static void putVarInt(int v, ByteBuffer sink) { while (true) { int bits = v & 0x7f; v >>>= 7; if (v == 0) { sink.put((byte) bits); return; } sink.put((byte) (bits | 0x80)); } }
[ "public", "static", "void", "putVarInt", "(", "int", "v", ",", "ByteBuffer", "sink", ")", "{", "while", "(", "true", ")", "{", "int", "bits", "=", "v", "&", "0x7f", ";", "v", ">>>=", "7", ";", "if", "(", "v", "==", "0", ")", "{", "sink", ".", ...
Encodes an integer in a variable-length encoding, 7 bits per byte, to a ByteBuffer sink. @param v the value to encode @param sink the ByteBuffer to add the encoded value
[ "Encodes", "an", "integer", "in", "a", "variable", "-", "length", "encoding", "7", "bits", "per", "byte", "to", "a", "ByteBuffer", "sink", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/impl_core/src/main/java/io/opencensus/implcore/internal/VarInt.java#L145-L155
65,238
census-instrumentation/opencensus-java
impl_core/src/main/java/io/opencensus/implcore/internal/VarInt.java
VarInt.getVarInt
public static int getVarInt(InputStream inputStream) throws IOException { int result = 0; int shift = 0; int b; do { if (shift >= 32) { // Out of range throw new IndexOutOfBoundsException("varint too long"); } // Get 7 bits from next byte b = inputStream.read(); ...
java
public static int getVarInt(InputStream inputStream) throws IOException { int result = 0; int shift = 0; int b; do { if (shift >= 32) { // Out of range throw new IndexOutOfBoundsException("varint too long"); } // Get 7 bits from next byte b = inputStream.read(); ...
[ "public", "static", "int", "getVarInt", "(", "InputStream", "inputStream", ")", "throws", "IOException", "{", "int", "result", "=", "0", ";", "int", "shift", "=", "0", ";", "int", "b", ";", "do", "{", "if", "(", "shift", ">=", "32", ")", "{", "// Out...
Reads a varint from the given InputStream and returns the decoded value as an int. @param inputStream the InputStream to read from
[ "Reads", "a", "varint", "from", "the", "given", "InputStream", "and", "returns", "the", "decoded", "value", "as", "an", "int", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/impl_core/src/main/java/io/opencensus/implcore/internal/VarInt.java#L162-L177
65,239
census-instrumentation/opencensus-java
impl_core/src/main/java/io/opencensus/implcore/internal/VarInt.java
VarInt.putVarInt
public static void putVarInt(int v, OutputStream outputStream) throws IOException { byte[] bytes = new byte[varIntSize(v)]; putVarInt(v, bytes, 0); outputStream.write(bytes); }
java
public static void putVarInt(int v, OutputStream outputStream) throws IOException { byte[] bytes = new byte[varIntSize(v)]; putVarInt(v, bytes, 0); outputStream.write(bytes); }
[ "public", "static", "void", "putVarInt", "(", "int", "v", ",", "OutputStream", "outputStream", ")", "throws", "IOException", "{", "byte", "[", "]", "bytes", "=", "new", "byte", "[", "varIntSize", "(", "v", ")", "]", ";", "putVarInt", "(", "v", ",", "by...
Encodes an integer in a variable-length encoding, 7 bits per byte, and writes it to the given OutputStream. @param v the value to encode @param outputStream the OutputStream to write to
[ "Encodes", "an", "integer", "in", "a", "variable", "-", "length", "encoding", "7", "bits", "per", "byte", "and", "writes", "it", "to", "the", "given", "OutputStream", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/impl_core/src/main/java/io/opencensus/implcore/internal/VarInt.java#L186-L190
65,240
census-instrumentation/opencensus-java
impl_core/src/main/java/io/opencensus/implcore/internal/VarInt.java
VarInt.getVarLong
public static long getVarLong(ByteBuffer src) { long tmp; if ((tmp = src.get()) >= 0) { return tmp; } long result = tmp & 0x7f; if ((tmp = src.get()) >= 0) { result |= tmp << 7; } else { result |= (tmp & 0x7f) << 7; if ((tmp = src.get()) >= 0) { result |= tmp << 1...
java
public static long getVarLong(ByteBuffer src) { long tmp; if ((tmp = src.get()) >= 0) { return tmp; } long result = tmp & 0x7f; if ((tmp = src.get()) >= 0) { result |= tmp << 7; } else { result |= (tmp & 0x7f) << 7; if ((tmp = src.get()) >= 0) { result |= tmp << 1...
[ "public", "static", "long", "getVarLong", "(", "ByteBuffer", "src", ")", "{", "long", "tmp", ";", "if", "(", "(", "tmp", "=", "src", ".", "get", "(", ")", ")", ">=", "0", ")", "{", "return", "tmp", ";", "}", "long", "result", "=", "tmp", "&", "...
Reads an up to 64 bit long varint from the current position of the given ByteBuffer and returns the decoded value as long. <p>The position of the buffer is advanced to the first byte after the decoded varint. @param src the ByteBuffer to get the var int from @return The integer value of the decoded long varint
[ "Reads", "an", "up", "to", "64", "bit", "long", "varint", "from", "the", "current", "position", "of", "the", "given", "ByteBuffer", "and", "returns", "the", "decoded", "value", "as", "long", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/impl_core/src/main/java/io/opencensus/implcore/internal/VarInt.java#L216-L264
65,241
census-instrumentation/opencensus-java
impl_core/src/main/java/io/opencensus/implcore/internal/VarInt.java
VarInt.putVarLong
public static void putVarLong(long v, ByteBuffer sink) { while (true) { int bits = ((int) v) & 0x7f; v >>>= 7; if (v == 0) { sink.put((byte) bits); return; } sink.put((byte) (bits | 0x80)); } }
java
public static void putVarLong(long v, ByteBuffer sink) { while (true) { int bits = ((int) v) & 0x7f; v >>>= 7; if (v == 0) { sink.put((byte) bits); return; } sink.put((byte) (bits | 0x80)); } }
[ "public", "static", "void", "putVarLong", "(", "long", "v", ",", "ByteBuffer", "sink", ")", "{", "while", "(", "true", ")", "{", "int", "bits", "=", "(", "(", "int", ")", "v", ")", "&", "0x7f", ";", "v", ">>>=", "7", ";", "if", "(", "v", "==", ...
Encodes a long integer in a variable-length encoding, 7 bits per byte, to a ByteBuffer sink. @param v the value to encode @param sink the ByteBuffer to add the encoded value
[ "Encodes", "a", "long", "integer", "in", "a", "variable", "-", "length", "encoding", "7", "bits", "per", "byte", "to", "a", "ByteBuffer", "sink", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/impl_core/src/main/java/io/opencensus/implcore/internal/VarInt.java#L272-L282
65,242
census-instrumentation/opencensus-java
benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/BasicOperationsBenchmark.java
BasicOperationsBenchmark.createRootSpan
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public Span createRootSpan(Data data) { Span span = data.tracer .spanBuilderWithExplicitParent("RootSpan", null) .setRecordEvents(data.recorded) .setSampler(data.sampled ? Samplers.alw...
java
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public Span createRootSpan(Data data) { Span span = data.tracer .spanBuilderWithExplicitParent("RootSpan", null) .setRecordEvents(data.recorded) .setSampler(data.sampled ? Samplers.alw...
[ "@", "Benchmark", "@", "BenchmarkMode", "(", "Mode", ".", "AverageTime", ")", "@", "OutputTimeUnit", "(", "TimeUnit", ".", "NANOSECONDS", ")", "public", "Span", "createRootSpan", "(", "Data", "data", ")", "{", "Span", "span", "=", "data", ".", "tracer", "....
Create a root span.
[ "Create", "a", "root", "span", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/BasicOperationsBenchmark.java#L132-L144
65,243
census-instrumentation/opencensus-java
benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/BasicOperationsBenchmark.java
BasicOperationsBenchmark.createLink
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public Link createLink(Data data) { return Link.fromSpanContext( SpanContext.create( TraceId.fromBytes(new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0}), SpanId.fromBytes(new byte...
java
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public Link createLink(Data data) { return Link.fromSpanContext( SpanContext.create( TraceId.fromBytes(new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0}), SpanId.fromBytes(new byte...
[ "@", "Benchmark", "@", "BenchmarkMode", "(", "Mode", ".", "AverageTime", ")", "@", "OutputTimeUnit", "(", "TimeUnit", ".", "NANOSECONDS", ")", "public", "Link", "createLink", "(", "Data", "data", ")", "{", "return", "Link", ".", "fromSpanContext", "(", "Span...
Create a link.
[ "Create", "a", "link", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/BasicOperationsBenchmark.java#L192-L203
65,244
census-instrumentation/opencensus-java
benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/BasicOperationsBenchmark.java
BasicOperationsBenchmark.createMessageEvent
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public MessageEvent createMessageEvent(Data data) { return MessageEvent.builder(MessageEvent.Type.SENT, MESSAGE_ID).build(); }
java
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public MessageEvent createMessageEvent(Data data) { return MessageEvent.builder(MessageEvent.Type.SENT, MESSAGE_ID).build(); }
[ "@", "Benchmark", "@", "BenchmarkMode", "(", "Mode", ".", "AverageTime", ")", "@", "OutputTimeUnit", "(", "TimeUnit", ".", "NANOSECONDS", ")", "public", "MessageEvent", "createMessageEvent", "(", "Data", "data", ")", "{", "return", "MessageEvent", ".", "builder"...
Create a message event.
[ "Create", "a", "message", "event", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/BasicOperationsBenchmark.java#L206-L211
65,245
census-instrumentation/opencensus-java
benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/BasicOperationsBenchmark.java
BasicOperationsBenchmark.getCurrentSpan
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public Span getCurrentSpan(Data data) { return data.tracer.getCurrentSpan(); }
java
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public Span getCurrentSpan(Data data) { return data.tracer.getCurrentSpan(); }
[ "@", "Benchmark", "@", "BenchmarkMode", "(", "Mode", ".", "AverageTime", ")", "@", "OutputTimeUnit", "(", "TimeUnit", ".", "NANOSECONDS", ")", "public", "Span", "getCurrentSpan", "(", "Data", "data", ")", "{", "return", "data", ".", "tracer", ".", "getCurren...
Get current trace span.
[ "Get", "current", "trace", "span", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/BasicOperationsBenchmark.java#L224-L229
65,246
census-instrumentation/opencensus-java
benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/BasicOperationsBenchmark.java
BasicOperationsBenchmark.encodeSpanBinary
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public byte[] encodeSpanBinary(Data data) { return data.propagation.getBinaryFormat().toByteArray(data.spanToEncode.getContext()); }
java
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public byte[] encodeSpanBinary(Data data) { return data.propagation.getBinaryFormat().toByteArray(data.spanToEncode.getContext()); }
[ "@", "Benchmark", "@", "BenchmarkMode", "(", "Mode", ".", "AverageTime", ")", "@", "OutputTimeUnit", "(", "TimeUnit", ".", "NANOSECONDS", ")", "public", "byte", "[", "]", "encodeSpanBinary", "(", "Data", "data", ")", "{", "return", "data", ".", "propagation"...
Encode a span using binary format.
[ "Encode", "a", "span", "using", "binary", "format", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/BasicOperationsBenchmark.java#L232-L237
65,247
census-instrumentation/opencensus-java
benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/BasicOperationsBenchmark.java
BasicOperationsBenchmark.decodeSpanBinary
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public SpanContext decodeSpanBinary(Data data) throws SpanContextParseException { return data.propagation.getBinaryFormat().fromByteArray(data.spanToDecodeBinary); }
java
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public SpanContext decodeSpanBinary(Data data) throws SpanContextParseException { return data.propagation.getBinaryFormat().fromByteArray(data.spanToDecodeBinary); }
[ "@", "Benchmark", "@", "BenchmarkMode", "(", "Mode", ".", "AverageTime", ")", "@", "OutputTimeUnit", "(", "TimeUnit", ".", "NANOSECONDS", ")", "public", "SpanContext", "decodeSpanBinary", "(", "Data", "data", ")", "throws", "SpanContextParseException", "{", "retur...
Decode a span using binary format.
[ "Decode", "a", "span", "using", "binary", "format", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/BasicOperationsBenchmark.java#L240-L245
65,248
census-instrumentation/opencensus-java
benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/BasicOperationsBenchmark.java
BasicOperationsBenchmark.encodeSpanText
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public String encodeSpanText(Data data) { return encodeSpanContextText( data.propagation.getTraceContextFormat(), data.spanToEncode.getContext()); }
java
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public String encodeSpanText(Data data) { return encodeSpanContextText( data.propagation.getTraceContextFormat(), data.spanToEncode.getContext()); }
[ "@", "Benchmark", "@", "BenchmarkMode", "(", "Mode", ".", "AverageTime", ")", "@", "OutputTimeUnit", "(", "TimeUnit", ".", "NANOSECONDS", ")", "public", "String", "encodeSpanText", "(", "Data", "data", ")", "{", "return", "encodeSpanContextText", "(", "data", ...
Encode a span using text format.
[ "Encode", "a", "span", "using", "text", "format", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/BasicOperationsBenchmark.java#L248-L254
65,249
census-instrumentation/opencensus-java
benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/BasicOperationsBenchmark.java
BasicOperationsBenchmark.decodeSpanText
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public SpanContext decodeSpanText(Data data) throws SpanContextParseException { return data.propagation.getTraceContextFormat().extract(data.spanToDecodeText, textGetter); }
java
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public SpanContext decodeSpanText(Data data) throws SpanContextParseException { return data.propagation.getTraceContextFormat().extract(data.spanToDecodeText, textGetter); }
[ "@", "Benchmark", "@", "BenchmarkMode", "(", "Mode", ".", "AverageTime", ")", "@", "OutputTimeUnit", "(", "TimeUnit", ".", "NANOSECONDS", ")", "public", "SpanContext", "decodeSpanText", "(", "Data", "data", ")", "throws", "SpanContextParseException", "{", "return"...
Decode a span using text format.
[ "Decode", "a", "span", "using", "text", "format", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/BasicOperationsBenchmark.java#L257-L262
65,250
census-instrumentation/opencensus-java
benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/BasicOperationsBenchmark.java
BasicOperationsBenchmark.setStatus
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public Span setStatus(Data data) { data.spanToSet.setStatus(STATUS_OK); return data.spanToSet; }
java
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public Span setStatus(Data data) { data.spanToSet.setStatus(STATUS_OK); return data.spanToSet; }
[ "@", "Benchmark", "@", "BenchmarkMode", "(", "Mode", ".", "AverageTime", ")", "@", "OutputTimeUnit", "(", "TimeUnit", ".", "NANOSECONDS", ")", "public", "Span", "setStatus", "(", "Data", "data", ")", "{", "data", ".", "spanToSet", ".", "setStatus", "(", "S...
Set status on a span.
[ "Set", "status", "on", "a", "span", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/BasicOperationsBenchmark.java#L265-L271
65,251
census-instrumentation/opencensus-java
benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/BasicOperationsBenchmark.java
BasicOperationsBenchmark.endSpan
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public Span endSpan(Data data) { data.spanToEnd.end(); return data.spanToEnd; }
java
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public Span endSpan(Data data) { data.spanToEnd.end(); return data.spanToEnd; }
[ "@", "Benchmark", "@", "BenchmarkMode", "(", "Mode", ".", "AverageTime", ")", "@", "OutputTimeUnit", "(", "TimeUnit", ".", "NANOSECONDS", ")", "public", "Span", "endSpan", "(", "Data", "data", ")", "{", "data", ".", "spanToEnd", ".", "end", "(", ")", ";"...
End a span.
[ "End", "a", "span", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/benchmarks/src/jmh/java/io/opencensus/benchmarks/trace/BasicOperationsBenchmark.java#L274-L280
65,252
census-instrumentation/opencensus-java
exporters/trace/stackdriver/src/main/java/io/opencensus/exporter/trace/stackdriver/StackdriverExporter.java
StackdriverExporter.createAndRegisterWithCredentialsAndProjectId
public static void createAndRegisterWithCredentialsAndProjectId( Credentials credentials, String projectId) throws IOException { StackdriverTraceExporter.createAndRegister( StackdriverTraceConfiguration.builder() .setCredentials(credentials) .setProjectId(projectId) ...
java
public static void createAndRegisterWithCredentialsAndProjectId( Credentials credentials, String projectId) throws IOException { StackdriverTraceExporter.createAndRegister( StackdriverTraceConfiguration.builder() .setCredentials(credentials) .setProjectId(projectId) ...
[ "public", "static", "void", "createAndRegisterWithCredentialsAndProjectId", "(", "Credentials", "credentials", ",", "String", "projectId", ")", "throws", "IOException", "{", "StackdriverTraceExporter", ".", "createAndRegister", "(", "StackdriverTraceConfiguration", ".", "buil...
Creates and registers the Stackdriver Trace exporter to the OpenCensus library for an explicit project ID and using explicit credentials. Only one Stackdriver exporter can be registered at any point. @param credentials a credentials used to authenticate API calls. @param projectId the cloud project id. @throws Illegal...
[ "Creates", "and", "registers", "the", "Stackdriver", "Trace", "exporter", "to", "the", "OpenCensus", "library", "for", "an", "explicit", "project", "ID", "and", "using", "explicit", "credentials", ".", "Only", "one", "Stackdriver", "exporter", "can", "be", "regi...
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/exporters/trace/stackdriver/src/main/java/io/opencensus/exporter/trace/stackdriver/StackdriverExporter.java#L55-L62
65,253
census-instrumentation/opencensus-java
exporters/trace/stackdriver/src/main/java/io/opencensus/exporter/trace/stackdriver/StackdriverExporter.java
StackdriverExporter.createAndRegisterWithProjectId
public static void createAndRegisterWithProjectId(String projectId) throws IOException { StackdriverTraceExporter.createAndRegister( StackdriverTraceConfiguration.builder() .setCredentials(GoogleCredentials.getApplicationDefault()) .setProjectId(projectId) .build()); }
java
public static void createAndRegisterWithProjectId(String projectId) throws IOException { StackdriverTraceExporter.createAndRegister( StackdriverTraceConfiguration.builder() .setCredentials(GoogleCredentials.getApplicationDefault()) .setProjectId(projectId) .build()); }
[ "public", "static", "void", "createAndRegisterWithProjectId", "(", "String", "projectId", ")", "throws", "IOException", "{", "StackdriverTraceExporter", ".", "createAndRegister", "(", "StackdriverTraceConfiguration", ".", "builder", "(", ")", ".", "setCredentials", "(", ...
Creates and registers the Stackdriver Trace exporter to the OpenCensus library for an explicit project ID. Only one Stackdriver exporter can be registered at any point. <p>This uses the default application credentials see {@link GoogleCredentials#getApplicationDefault}. <p>This is equivalent with: <pre>{@code Stackd...
[ "Creates", "and", "registers", "the", "Stackdriver", "Trace", "exporter", "to", "the", "OpenCensus", "library", "for", "an", "explicit", "project", "ID", ".", "Only", "one", "Stackdriver", "exporter", "can", "be", "registered", "at", "any", "point", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/exporters/trace/stackdriver/src/main/java/io/opencensus/exporter/trace/stackdriver/StackdriverExporter.java#L82-L88
65,254
census-instrumentation/opencensus-java
exporters/stats/signalfx/src/main/java/io/opencensus/exporter/stats/signalfx/SignalFxSessionAdaptor.java
SignalFxSessionAdaptor.adapt
static List<DataPoint> adapt(Metric metric) { MetricDescriptor metricDescriptor = metric.getMetricDescriptor(); MetricType metricType = getType(metricDescriptor.getType()); if (metricType == null) { return Collections.emptyList(); } DataPoint.Builder shared = DataPoint.newBuilder(); share...
java
static List<DataPoint> adapt(Metric metric) { MetricDescriptor metricDescriptor = metric.getMetricDescriptor(); MetricType metricType = getType(metricDescriptor.getType()); if (metricType == null) { return Collections.emptyList(); } DataPoint.Builder shared = DataPoint.newBuilder(); share...
[ "static", "List", "<", "DataPoint", ">", "adapt", "(", "Metric", "metric", ")", "{", "MetricDescriptor", "metricDescriptor", "=", "metric", ".", "getMetricDescriptor", "(", ")", ";", "MetricType", "metricType", "=", "getType", "(", "metricDescriptor", ".", "getT...
Converts the given Metric into datapoints that can be sent to SignalFx. @param metric The {@link Metric} containing the timeseries of each combination of label values. @return A list of datapoints for the corresponding metric timeseries of this metric.
[ "Converts", "the", "given", "Metric", "into", "datapoints", "that", "can", "be", "sent", "to", "SignalFx", "." ]
deefac9bed77e40a2297bff1ca5ec5aa48a5f755
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/exporters/stats/signalfx/src/main/java/io/opencensus/exporter/stats/signalfx/SignalFxSessionAdaptor.java#L98-L122
65,255
jenkinsci/email-ext-plugin
src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java
ExtendedEmailPublisherDescriptor.setSmtpAuth
@SuppressWarnings("unused") public void setSmtpAuth(String userName, String password) { setSmtpUsername(userName); setSmtpPassword(password); }
java
@SuppressWarnings("unused") public void setSmtpAuth(String userName, String password) { setSmtpUsername(userName); setSmtpPassword(password); }
[ "@", "SuppressWarnings", "(", "\"unused\"", ")", "public", "void", "setSmtpAuth", "(", "String", "userName", ",", "String", "password", ")", "{", "setSmtpUsername", "(", "userName", ")", ";", "setSmtpPassword", "(", "password", ")", ";", "}" ]
Make API match Mailer plugin
[ "Make", "API", "match", "Mailer", "plugin" ]
21fbd402665848a18205b26751424149e51e86e4
https://github.com/jenkinsci/email-ext-plugin/blob/21fbd402665848a18205b26751424149e51e86e4/src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java#L345-L349
65,256
jenkinsci/email-ext-plugin
src/main/java/hudson/plugins/emailext/plugins/trigger/AbstractScriptTrigger.java
AbstractScriptTrigger.readResolve
private Object readResolve() throws ObjectStreamException { if (triggerScript != null && secureTriggerScript == null) { this.secureTriggerScript = new SecureGroovyScript(triggerScript, false, null); this.secureTriggerScript.configuring(ApprovalContext.create()); triggerSc...
java
private Object readResolve() throws ObjectStreamException { if (triggerScript != null && secureTriggerScript == null) { this.secureTriggerScript = new SecureGroovyScript(triggerScript, false, null); this.secureTriggerScript.configuring(ApprovalContext.create()); triggerSc...
[ "private", "Object", "readResolve", "(", ")", "throws", "ObjectStreamException", "{", "if", "(", "triggerScript", "!=", "null", "&&", "secureTriggerScript", "==", "null", ")", "{", "this", ".", "secureTriggerScript", "=", "new", "SecureGroovyScript", "(", "trigger...
Called when object has been deserialized from a stream. @return {@code this}, or a replacement for {@code this}. @throws ObjectStreamException if the object cannot be restored. @see <a href="http://download.oracle.com/javase/1.3/docs/guide/serialization/spec/input.doc6.html">The Java Object Serialization Specification...
[ "Called", "when", "object", "has", "been", "deserialized", "from", "a", "stream", "." ]
21fbd402665848a18205b26751424149e51e86e4
https://github.com/jenkinsci/email-ext-plugin/blob/21fbd402665848a18205b26751424149e51e86e4/src/main/java/hudson/plugins/emailext/plugins/trigger/AbstractScriptTrigger.java#L176-L183
65,257
jenkinsci/email-ext-plugin
src/main/java/hudson/plugins/emailext/plugins/content/ScriptContent.java
ScriptContent.renderTemplate
private String renderTemplate(Run<?, ?> build, FilePath workspace, TaskListener listener, InputStream templateStream) throws IOException { String result; final Map<String, Object> binding = new HashMap<>(); ExtendedEmailPublisherDescriptor descriptor = Jenkins.getAc...
java
private String renderTemplate(Run<?, ?> build, FilePath workspace, TaskListener listener, InputStream templateStream) throws IOException { String result; final Map<String, Object> binding = new HashMap<>(); ExtendedEmailPublisherDescriptor descriptor = Jenkins.getAc...
[ "private", "String", "renderTemplate", "(", "Run", "<", "?", ",", "?", ">", "build", ",", "FilePath", "workspace", ",", "TaskListener", "listener", ",", "InputStream", "templateStream", ")", "throws", "IOException", "{", "String", "result", ";", "final", "Map"...
Renders the template using a SimpleTemplateEngine @param build the build to act on @param templateStream the template file stream @return the rendered template content @throws IOException
[ "Renders", "the", "template", "using", "a", "SimpleTemplateEngine" ]
21fbd402665848a18205b26751424149e51e86e4
https://github.com/jenkinsci/email-ext-plugin/blob/21fbd402665848a18205b26751424149e51e86e4/src/main/java/hudson/plugins/emailext/plugins/content/ScriptContent.java#L114-L176
65,258
jenkinsci/email-ext-plugin
src/main/java/hudson/plugins/emailext/plugins/content/ScriptContent.java
ScriptContent.executeScript
private String executeScript(Run<?, ?> build, FilePath workspace, TaskListener listener, InputStream scriptStream) throws IOException { String result = ""; Map binding = new HashMap<>(); ExtendedEmailPublisherDescriptor descriptor = Jenkins.getActiveInstance().getDescriptorByType(Ext...
java
private String executeScript(Run<?, ?> build, FilePath workspace, TaskListener listener, InputStream scriptStream) throws IOException { String result = ""; Map binding = new HashMap<>(); ExtendedEmailPublisherDescriptor descriptor = Jenkins.getActiveInstance().getDescriptorByType(Ext...
[ "private", "String", "executeScript", "(", "Run", "<", "?", ",", "?", ">", "build", ",", "FilePath", "workspace", ",", "TaskListener", "listener", ",", "InputStream", "scriptStream", ")", "throws", "IOException", "{", "String", "result", "=", "\"\"", ";", "M...
Executes a script and returns the last value as a String @param build the build to act on @param scriptStream the script input stream @return a String containing the toString of the last item in the script @throws IOException
[ "Executes", "a", "script", "and", "returns", "the", "last", "value", "as", "a", "String" ]
21fbd402665848a18205b26751424149e51e86e4
https://github.com/jenkinsci/email-ext-plugin/blob/21fbd402665848a18205b26751424149e51e86e4/src/main/java/hudson/plugins/emailext/plugins/content/ScriptContent.java#L186-L233
65,259
jenkinsci/email-ext-plugin
src/main/java/hudson/plugins/emailext/plugins/recipients/UpstreamComitterRecipientProvider.java
UpstreamComitterRecipientProvider.addUpstreamCommittersTriggeringBuild
private void addUpstreamCommittersTriggeringBuild(Run<?, ?> build, Set<InternetAddress> to, Set<InternetAddress> cc, Set<InternetAddress> bcc, EnvVars env, final ExtendedEmailPublisherContext context, RecipientProviderUtilities.IDebug debug) { debug.send("Adding upstream committer from job %s with build number ...
java
private void addUpstreamCommittersTriggeringBuild(Run<?, ?> build, Set<InternetAddress> to, Set<InternetAddress> cc, Set<InternetAddress> bcc, EnvVars env, final ExtendedEmailPublisherContext context, RecipientProviderUtilities.IDebug debug) { debug.send("Adding upstream committer from job %s with build number ...
[ "private", "void", "addUpstreamCommittersTriggeringBuild", "(", "Run", "<", "?", ",", "?", ">", "build", ",", "Set", "<", "InternetAddress", ">", "to", ",", "Set", "<", "InternetAddress", ">", "cc", ",", "Set", "<", "InternetAddress", ">", "bcc", ",", "Env...
Adds for the given upstream build the committers to the recipient list for each commit in the upstream build. @param build the upstream build @param to the to recipient list @param cc the cc recipient list @param bcc the bcc recipient list @param env @param listener
[ "Adds", "for", "the", "given", "upstream", "build", "the", "committers", "to", "the", "recipient", "list", "for", "each", "commit", "in", "the", "upstream", "build", "." ]
21fbd402665848a18205b26751424149e51e86e4
https://github.com/jenkinsci/email-ext-plugin/blob/21fbd402665848a18205b26751424149e51e86e4/src/main/java/hudson/plugins/emailext/plugins/recipients/UpstreamComitterRecipientProvider.java#L77-L101
65,260
jenkinsci/email-ext-plugin
src/main/java/hudson/plugins/emailext/plugins/recipients/UpstreamComitterRecipientProvider.java
UpstreamComitterRecipientProvider.addUserFromChangeSet
private void addUserFromChangeSet(ChangeLogSet.Entry change, Set<InternetAddress> to, Set<InternetAddress> cc, Set<InternetAddress> bcc, EnvVars env, final ExtendedEmailPublisherContext context, RecipientProviderUtilities.IDebug debug) { User user = change.getAuthor(); RecipientProviderUtilities.addUser...
java
private void addUserFromChangeSet(ChangeLogSet.Entry change, Set<InternetAddress> to, Set<InternetAddress> cc, Set<InternetAddress> bcc, EnvVars env, final ExtendedEmailPublisherContext context, RecipientProviderUtilities.IDebug debug) { User user = change.getAuthor(); RecipientProviderUtilities.addUser...
[ "private", "void", "addUserFromChangeSet", "(", "ChangeLogSet", ".", "Entry", "change", ",", "Set", "<", "InternetAddress", ">", "to", ",", "Set", "<", "InternetAddress", ">", "cc", ",", "Set", "<", "InternetAddress", ">", "bcc", ",", "EnvVars", "env", ",", ...
Adds a user to the recipients list based on a specific SCM change set @param change The ChangeLogSet.Entry to get the user information from @param to The list of to addresses to add to @param cc The list of cc addresses to add to @param bcc The list of bcc addresses to add to @param env The build environment @param lis...
[ "Adds", "a", "user", "to", "the", "recipients", "list", "based", "on", "a", "specific", "SCM", "change", "set" ]
21fbd402665848a18205b26751424149e51e86e4
https://github.com/jenkinsci/email-ext-plugin/blob/21fbd402665848a18205b26751424149e51e86e4/src/main/java/hudson/plugins/emailext/plugins/recipients/UpstreamComitterRecipientProvider.java#L112-L115
65,261
jenkinsci/email-ext-plugin
src/main/java/hudson/plugins/emailext/plugins/CssInliner.java
CssInliner.fetchStyles
private String fetchStyles(Document doc) { Elements els = doc.select(STYLE_TAG); StringBuilder styles = new StringBuilder(); for (Element e : els) { if (e.attr("data-inline").equals("true")) { styles.append(e.data()); e.remove(); } ...
java
private String fetchStyles(Document doc) { Elements els = doc.select(STYLE_TAG); StringBuilder styles = new StringBuilder(); for (Element e : els) { if (e.attr("data-inline").equals("true")) { styles.append(e.data()); e.remove(); } ...
[ "private", "String", "fetchStyles", "(", "Document", "doc", ")", "{", "Elements", "els", "=", "doc", ".", "select", "(", "STYLE_TAG", ")", ";", "StringBuilder", "styles", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "Element", "e", ":", "els",...
Generates a stylesheet from an html document @param doc the html document @return a string representing the stylesheet.
[ "Generates", "a", "stylesheet", "from", "an", "html", "document" ]
21fbd402665848a18205b26751424149e51e86e4
https://github.com/jenkinsci/email-ext-plugin/blob/21fbd402665848a18205b26751424149e51e86e4/src/main/java/hudson/plugins/emailext/plugins/CssInliner.java#L63-L73
65,262
jenkinsci/email-ext-plugin
src/main/java/hudson/plugins/emailext/plugins/CssInliner.java
CssInliner.process
public String process(String input) { Document doc = Jsoup.parse(input); // check if the user wants to inline the data Elements elements = doc.getElementsByAttributeValue(DATA_INLINE_ATTR, "true"); if (elements.isEmpty()) { return input; } extractStyles(doc)...
java
public String process(String input) { Document doc = Jsoup.parse(input); // check if the user wants to inline the data Elements elements = doc.getElementsByAttributeValue(DATA_INLINE_ATTR, "true"); if (elements.isEmpty()) { return input; } extractStyles(doc)...
[ "public", "String", "process", "(", "String", "input", ")", "{", "Document", "doc", "=", "Jsoup", ".", "parse", "(", "input", ")", ";", "// check if the user wants to inline the data", "Elements", "elements", "=", "doc", ".", "getElementsByAttributeValue", "(", "D...
Takes an input string representing an html document and processes it with the Css Inliner. @param input the html document @return the processed html document
[ "Takes", "an", "input", "string", "representing", "an", "html", "document", "and", "processes", "it", "with", "the", "Css", "Inliner", "." ]
21fbd402665848a18205b26751424149e51e86e4
https://github.com/jenkinsci/email-ext-plugin/blob/21fbd402665848a18205b26751424149e51e86e4/src/main/java/hudson/plugins/emailext/plugins/CssInliner.java#L86-L101
65,263
jenkinsci/email-ext-plugin
src/main/java/hudson/plugins/emailext/Util.java
Util.unescapeString
public static String unescapeString(String escapedString) { StringBuilder sb = new StringBuilder(); for (int i = 1; i < escapedString.length() - 1; ++i) { char c = escapedString.charAt(i); if (c == '\\') { ++i; sb.append(unescapeChar(escapedS...
java
public static String unescapeString(String escapedString) { StringBuilder sb = new StringBuilder(); for (int i = 1; i < escapedString.length() - 1; ++i) { char c = escapedString.charAt(i); if (c == '\\') { ++i; sb.append(unescapeChar(escapedS...
[ "public", "static", "String", "unescapeString", "(", "String", "escapedString", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<", "escapedString", ".", "length", "(", ")", "-", ...
Replaces all the printf-style escape sequences in a string with the appropriate characters. @param escapedString the string containing escapes @return the string with all the escape sequences replaced
[ "Replaces", "all", "the", "printf", "-", "style", "escape", "sequences", "in", "a", "string", "with", "the", "appropriate", "characters", "." ]
21fbd402665848a18205b26751424149e51e86e4
https://github.com/jenkinsci/email-ext-plugin/blob/21fbd402665848a18205b26751424149e51e86e4/src/main/java/hudson/plugins/emailext/Util.java#L22-L34
65,264
jenkinsci/email-ext-plugin
src/main/java/hudson/plugins/emailext/Util.java
Util.printf
public static void printf(StringBuffer buf, String formatString, PrintfSpec printfSpec) { for (int i = 0; i < formatString.length(); ++i) { char c = formatString.charAt(i); if ((c == '%') && (i + 1 < formatString.length())) { ++i; char code = formatSt...
java
public static void printf(StringBuffer buf, String formatString, PrintfSpec printfSpec) { for (int i = 0; i < formatString.length(); ++i) { char c = formatString.charAt(i); if ((c == '%') && (i + 1 < formatString.length())) { ++i; char code = formatSt...
[ "public", "static", "void", "printf", "(", "StringBuffer", "buf", ",", "String", "formatString", ",", "PrintfSpec", "printfSpec", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "formatString", ".", "length", "(", ")", ";", "++", "i", ")", ...
Formats a string and puts the result into a StringBuffer. Allows for standard Java backslash escapes and a customized behavior for % escapes in the form of a PrintfSpec. @param buf the buffer to append the result to @param formatString the string to format @param printfSpec the specialization for printf
[ "Formats", "a", "string", "and", "puts", "the", "result", "into", "a", "StringBuffer", ".", "Allows", "for", "standard", "Java", "backslash", "escapes", "and", "a", "customized", "behavior", "for", "%", "escapes", "in", "the", "form", "of", "a", "PrintfSpec"...
21fbd402665848a18205b26751424149e51e86e4
https://github.com/jenkinsci/email-ext-plugin/blob/21fbd402665848a18205b26751424149e51e86e4/src/main/java/hudson/plugins/emailext/Util.java#L82-L104
65,265
jenkinsci/email-ext-plugin
src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java
ExtendedEmailPublisher.expandClasspath
private ClassLoader expandClasspath(ExtendedEmailPublisherContext context, ClassLoader loader) throws IOException { List<ClasspathEntry> classpathList = new ArrayList<>(); if (classpath != null && !classpath.isEmpty()) { transformToClasspathEntries(classpath, context, classpathList); ...
java
private ClassLoader expandClasspath(ExtendedEmailPublisherContext context, ClassLoader loader) throws IOException { List<ClasspathEntry> classpathList = new ArrayList<>(); if (classpath != null && !classpath.isEmpty()) { transformToClasspathEntries(classpath, context, classpathList); ...
[ "private", "ClassLoader", "expandClasspath", "(", "ExtendedEmailPublisherContext", "context", ",", "ClassLoader", "loader", ")", "throws", "IOException", "{", "List", "<", "ClasspathEntry", ">", "classpathList", "=", "new", "ArrayList", "<>", "(", ")", ";", "if", ...
Expand the plugin class loader with URL taken from the project descriptor and the global configuration. @param context the current email context @param loader the class loader to expand @return the new expanded classloader
[ "Expand", "the", "plugin", "class", "loader", "with", "URL", "taken", "from", "the", "project", "descriptor", "and", "the", "global", "configuration", "." ]
21fbd402665848a18205b26751424149e51e86e4
https://github.com/jenkinsci/email-ext-plugin/blob/21fbd402665848a18205b26751424149e51e86e4/src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java#L661-L689
65,266
jenkinsci/email-ext-plugin
src/main/java/hudson/plugins/emailext/plugins/EmailTrigger.java
EmailTrigger.getNumFailures
protected int getNumFailures(Run<?, ?> build) { AbstractTestResultAction a = build.getAction(AbstractTestResultAction.class); if (a instanceof AggregatedTestResultAction) { int result = 0; AggregatedTestResultAction action = (AggregatedTestResultAction) a; for (ChildR...
java
protected int getNumFailures(Run<?, ?> build) { AbstractTestResultAction a = build.getAction(AbstractTestResultAction.class); if (a instanceof AggregatedTestResultAction) { int result = 0; AggregatedTestResultAction action = (AggregatedTestResultAction) a; for (ChildR...
[ "protected", "int", "getNumFailures", "(", "Run", "<", "?", ",", "?", ">", "build", ")", "{", "AbstractTestResultAction", "a", "=", "build", ".", "getAction", "(", "AbstractTestResultAction", ".", "class", ")", ";", "if", "(", "a", "instanceof", "AggregatedT...
Determine the number of direct failures in the given build. If it aggregates downstream results, ignore contributed failures. This is because at the time this trigger runs, the current build's aggregated results aren't available yet, but those of the previous build may be. @param build The project run to get the numbe...
[ "Determine", "the", "number", "of", "direct", "failures", "in", "the", "given", "build", ".", "If", "it", "aggregates", "downstream", "results", "ignore", "contributed", "failures", ".", "This", "is", "because", "at", "the", "time", "this", "trigger", "runs", ...
21fbd402665848a18205b26751424149e51e86e4
https://github.com/jenkinsci/email-ext-plugin/blob/21fbd402665848a18205b26751424149e51e86e4/src/main/java/hudson/plugins/emailext/plugins/EmailTrigger.java#L154-L177
65,267
jenkinsci/email-ext-plugin
src/main/java/hudson/plugins/emailext/plugins/trigger/FixedUnhealthyTrigger.java
FixedUnhealthyTrigger.getPreviousRun
private Run<?, ?> getPreviousRun(Run<?, ?> build, TaskListener listener) { Run<?, ?> prevBuild = ExtendedEmailPublisher.getPreviousRun(build, listener); // Skip ABORTED builds if (prevBuild != null && prevBuild.getResult() == Result.ABORTED) { return getPreviousRun(prevBuild, liste...
java
private Run<?, ?> getPreviousRun(Run<?, ?> build, TaskListener listener) { Run<?, ?> prevBuild = ExtendedEmailPublisher.getPreviousRun(build, listener); // Skip ABORTED builds if (prevBuild != null && prevBuild.getResult() == Result.ABORTED) { return getPreviousRun(prevBuild, liste...
[ "private", "Run", "<", "?", ",", "?", ">", "getPreviousRun", "(", "Run", "<", "?", ",", "?", ">", "build", ",", "TaskListener", "listener", ")", "{", "Run", "<", "?", ",", "?", ">", "prevBuild", "=", "ExtendedEmailPublisher", ".", "getPreviousRun", "("...
Find most recent previous build matching certain criteria.
[ "Find", "most", "recent", "previous", "build", "matching", "certain", "criteria", "." ]
21fbd402665848a18205b26751424149e51e86e4
https://github.com/jenkinsci/email-ext-plugin/blob/21fbd402665848a18205b26751424149e51e86e4/src/main/java/hudson/plugins/emailext/plugins/trigger/FixedUnhealthyTrigger.java#L50-L60
65,268
alibaba/java-dns-cache-manipulator
library/src/main/java/com/alibaba/dcm/DnsCacheManipulator.java
DnsCacheManipulator.setDnsCache
public static void setDnsCache(long expireMillis, String host, String... ips) { try { InetAddressCacheUtil.setInetAddressCache(host, ips, System.currentTimeMillis() + expireMillis); } catch (Exception e) { final String message = String.format("Fail to setDnsCache for host %s ip %...
java
public static void setDnsCache(long expireMillis, String host, String... ips) { try { InetAddressCacheUtil.setInetAddressCache(host, ips, System.currentTimeMillis() + expireMillis); } catch (Exception e) { final String message = String.format("Fail to setDnsCache for host %s ip %...
[ "public", "static", "void", "setDnsCache", "(", "long", "expireMillis", ",", "String", "host", ",", "String", "...", "ips", ")", "{", "try", "{", "InetAddressCacheUtil", ".", "setInetAddressCache", "(", "host", ",", "ips", ",", "System", ".", "currentTimeMilli...
Set a dns cache entry. @param expireMillis expire time in milliseconds. @param host host @param ips ips @throws DnsCacheManipulatorException Operation fail
[ "Set", "a", "dns", "cache", "entry", "." ]
eab50ee5c27671f9159b55458301f9429b2fcc47
https://github.com/alibaba/java-dns-cache-manipulator/blob/eab50ee5c27671f9159b55458301f9429b2fcc47/library/src/main/java/com/alibaba/dcm/DnsCacheManipulator.java#L53-L61
65,269
alibaba/java-dns-cache-manipulator
library/src/main/java/com/alibaba/dcm/DnsCacheManipulator.java
DnsCacheManipulator.setDnsCache
public static void setDnsCache(Properties properties) { for (Map.Entry<Object, Object> entry : properties.entrySet()) { final String host = (String) entry.getKey(); String ipList = (String) entry.getValue(); ipList = ipList.trim(); if (ipList.isEmpty()) continue;...
java
public static void setDnsCache(Properties properties) { for (Map.Entry<Object, Object> entry : properties.entrySet()) { final String host = (String) entry.getKey(); String ipList = (String) entry.getValue(); ipList = ipList.trim(); if (ipList.isEmpty()) continue;...
[ "public", "static", "void", "setDnsCache", "(", "Properties", "properties", ")", "{", "for", "(", "Map", ".", "Entry", "<", "Object", ",", "Object", ">", "entry", ":", "properties", ".", "entrySet", "(", ")", ")", "{", "final", "String", "host", "=", "...
Set dns cache entries by properties @param properties input properties. eg. {@code www.example.com=42.42.42.42}, or {@code www.example.com=42.42.42.42,43.43.43.43} @throws DnsCacheManipulatorException Operation fail
[ "Set", "dns", "cache", "entries", "by", "properties" ]
eab50ee5c27671f9159b55458301f9429b2fcc47
https://github.com/alibaba/java-dns-cache-manipulator/blob/eab50ee5c27671f9159b55458301f9429b2fcc47/library/src/main/java/com/alibaba/dcm/DnsCacheManipulator.java#L71-L82
65,270
alibaba/java-dns-cache-manipulator
library/src/main/java/com/alibaba/dcm/DnsCacheManipulator.java
DnsCacheManipulator.loadDnsCacheConfig
public static void loadDnsCacheConfig(String propertiesFileName) { InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(propertiesFileName); if (inputStream == null) { inputStream = DnsCacheManipulator.class.getClassLoader().getResourceAsStream(propert...
java
public static void loadDnsCacheConfig(String propertiesFileName) { InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(propertiesFileName); if (inputStream == null) { inputStream = DnsCacheManipulator.class.getClassLoader().getResourceAsStream(propert...
[ "public", "static", "void", "loadDnsCacheConfig", "(", "String", "propertiesFileName", ")", "{", "InputStream", "inputStream", "=", "Thread", ".", "currentThread", "(", ")", ".", "getContextClassLoader", "(", ")", ".", "getResourceAsStream", "(", "propertiesFileName",...
Load dns config from the specified properties file on classpath, then set dns cache. @param propertiesFileName specified properties file name on classpath. @throws DnsCacheManipulatorException Operation fail @see DnsCacheManipulator#setDnsCache(java.util.Properties)
[ "Load", "dns", "config", "from", "the", "specified", "properties", "file", "on", "classpath", "then", "set", "dns", "cache", "." ]
eab50ee5c27671f9159b55458301f9429b2fcc47
https://github.com/alibaba/java-dns-cache-manipulator/blob/eab50ee5c27671f9159b55458301f9429b2fcc47/library/src/main/java/com/alibaba/dcm/DnsCacheManipulator.java#L106-L125
65,271
alibaba/java-dns-cache-manipulator
library/src/main/java/com/alibaba/dcm/DnsCacheManipulator.java
DnsCacheManipulator.getDnsCache
@Nullable public static DnsCacheEntry getDnsCache(String host) { try { return InetAddressCacheUtil.getInetAddressCache(host); } catch (Exception e) { throw new DnsCacheManipulatorException("Fail to getDnsCache, cause: " + e.toString(), e); } }
java
@Nullable public static DnsCacheEntry getDnsCache(String host) { try { return InetAddressCacheUtil.getInetAddressCache(host); } catch (Exception e) { throw new DnsCacheManipulatorException("Fail to getDnsCache, cause: " + e.toString(), e); } }
[ "@", "Nullable", "public", "static", "DnsCacheEntry", "getDnsCache", "(", "String", "host", ")", "{", "try", "{", "return", "InetAddressCacheUtil", ".", "getInetAddressCache", "(", "host", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw", "ne...
Get dns cache. @return dns cache. return {@code null} if no entry for host or dns cache is expired. @throws DnsCacheManipulatorException Operation fail
[ "Get", "dns", "cache", "." ]
eab50ee5c27671f9159b55458301f9429b2fcc47
https://github.com/alibaba/java-dns-cache-manipulator/blob/eab50ee5c27671f9159b55458301f9429b2fcc47/library/src/main/java/com/alibaba/dcm/DnsCacheManipulator.java#L133-L140
65,272
alibaba/java-dns-cache-manipulator
library/src/main/java/com/alibaba/dcm/DnsCacheManipulator.java
DnsCacheManipulator.listDnsCache
public static List<DnsCacheEntry> listDnsCache() { try { return InetAddressCacheUtil.listInetAddressCache().getCache(); } catch (Exception e) { throw new DnsCacheManipulatorException("Fail to listDnsCache, cause: " + e.toString(), e); } }
java
public static List<DnsCacheEntry> listDnsCache() { try { return InetAddressCacheUtil.listInetAddressCache().getCache(); } catch (Exception e) { throw new DnsCacheManipulatorException("Fail to listDnsCache, cause: " + e.toString(), e); } }
[ "public", "static", "List", "<", "DnsCacheEntry", ">", "listDnsCache", "(", ")", "{", "try", "{", "return", "InetAddressCacheUtil", ".", "listInetAddressCache", "(", ")", ".", "getCache", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw...
Get all dns cache entries. @return dns cache entries @throws DnsCacheManipulatorException Operation fail @see #getWholeDnsCache() @since 1.2.0
[ "Get", "all", "dns", "cache", "entries", "." ]
eab50ee5c27671f9159b55458301f9429b2fcc47
https://github.com/alibaba/java-dns-cache-manipulator/blob/eab50ee5c27671f9159b55458301f9429b2fcc47/library/src/main/java/com/alibaba/dcm/DnsCacheManipulator.java#L162-L168
65,273
alibaba/java-dns-cache-manipulator
library/src/main/java/com/alibaba/dcm/DnsCacheManipulator.java
DnsCacheManipulator.getWholeDnsCache
public static DnsCache getWholeDnsCache() { try { return InetAddressCacheUtil.listInetAddressCache(); } catch (Exception e) { throw new DnsCacheManipulatorException("Fail to getWholeDnsCache, cause: " + e.toString(), e); } }
java
public static DnsCache getWholeDnsCache() { try { return InetAddressCacheUtil.listInetAddressCache(); } catch (Exception e) { throw new DnsCacheManipulatorException("Fail to getWholeDnsCache, cause: " + e.toString(), e); } }
[ "public", "static", "DnsCache", "getWholeDnsCache", "(", ")", "{", "try", "{", "return", "InetAddressCacheUtil", ".", "listInetAddressCache", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw", "new", "DnsCacheManipulatorException", "(", "\"Fa...
Get whole dns cache info. @return dns cache entries @throws DnsCacheManipulatorException Operation fail @since 1.2.0
[ "Get", "whole", "dns", "cache", "info", "." ]
eab50ee5c27671f9159b55458301f9429b2fcc47
https://github.com/alibaba/java-dns-cache-manipulator/blob/eab50ee5c27671f9159b55458301f9429b2fcc47/library/src/main/java/com/alibaba/dcm/DnsCacheManipulator.java#L177-L183
65,274
alibaba/java-dns-cache-manipulator
library/src/main/java/com/alibaba/dcm/DnsCacheManipulator.java
DnsCacheManipulator.removeDnsCache
public static void removeDnsCache(String host) { try { InetAddressCacheUtil.removeInetAddressCache(host); } catch (Exception e) { final String message = String.format("Fail to removeDnsCache for host %s, cause: %s", host, e.toString()); throw new DnsCacheManipulatorEx...
java
public static void removeDnsCache(String host) { try { InetAddressCacheUtil.removeInetAddressCache(host); } catch (Exception e) { final String message = String.format("Fail to removeDnsCache for host %s, cause: %s", host, e.toString()); throw new DnsCacheManipulatorEx...
[ "public", "static", "void", "removeDnsCache", "(", "String", "host", ")", "{", "try", "{", "InetAddressCacheUtil", ".", "removeInetAddressCache", "(", "host", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "final", "String", "message", "=", "String...
Remove dns cache entry, cause lookup dns server for host after. @param host host @throws DnsCacheManipulatorException Operation fail @see DnsCacheManipulator#clearDnsCache
[ "Remove", "dns", "cache", "entry", "cause", "lookup", "dns", "server", "for", "host", "after", "." ]
eab50ee5c27671f9159b55458301f9429b2fcc47
https://github.com/alibaba/java-dns-cache-manipulator/blob/eab50ee5c27671f9159b55458301f9429b2fcc47/library/src/main/java/com/alibaba/dcm/DnsCacheManipulator.java#L192-L199
65,275
alibaba/java-dns-cache-manipulator
library/src/main/java/com/alibaba/dcm/DnsCacheManipulator.java
DnsCacheManipulator.setDnsNegativeCachePolicy
public static void setDnsNegativeCachePolicy(int negativeCacheSeconds) { try { InetAddressCacheUtil.setDnsNegativeCachePolicy(negativeCacheSeconds); } catch (Exception e) { throw new DnsCacheManipulatorException("Fail to setDnsNegativeCachePolicy, cause: " + e.toString(), e); ...
java
public static void setDnsNegativeCachePolicy(int negativeCacheSeconds) { try { InetAddressCacheUtil.setDnsNegativeCachePolicy(negativeCacheSeconds); } catch (Exception e) { throw new DnsCacheManipulatorException("Fail to setDnsNegativeCachePolicy, cause: " + e.toString(), e); ...
[ "public", "static", "void", "setDnsNegativeCachePolicy", "(", "int", "negativeCacheSeconds", ")", "{", "try", "{", "InetAddressCacheUtil", ".", "setDnsNegativeCachePolicy", "(", "negativeCacheSeconds", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw"...
Set JVM DNS negative cache policy @param negativeCacheSeconds set default dns cache time. Special input case: <ul> <li> {@code -1} means never expired.(In effect, all negative value)</li> <li> {@code 0} never cached.</li> </ul> @throws DnsCacheManipulatorException Operation fail @since 1.3.0
[ "Set", "JVM", "DNS", "negative", "cache", "policy" ]
eab50ee5c27671f9159b55458301f9429b2fcc47
https://github.com/alibaba/java-dns-cache-manipulator/blob/eab50ee5c27671f9159b55458301f9429b2fcc47/library/src/main/java/com/alibaba/dcm/DnsCacheManipulator.java#L286-L292
65,276
DreaminginCodeZH/MaterialProgressBar
library/src/main/java/me/zhanghai/android/materialprogressbar/internal/DrawableContainerCompat.java
DrawableContainerCompat.initializeDrawableForDisplay
private void initializeDrawableForDisplay(Drawable d) { if (mBlockInvalidateCallback == null) { mBlockInvalidateCallback = new BlockInvalidateCallback(); } // Temporary fix for suspending callbacks during initialization. We // don't want any of these setters causing an invali...
java
private void initializeDrawableForDisplay(Drawable d) { if (mBlockInvalidateCallback == null) { mBlockInvalidateCallback = new BlockInvalidateCallback(); } // Temporary fix for suspending callbacks during initialization. We // don't want any of these setters causing an invali...
[ "private", "void", "initializeDrawableForDisplay", "(", "Drawable", "d", ")", "{", "if", "(", "mBlockInvalidateCallback", "==", "null", ")", "{", "mBlockInvalidateCallback", "=", "new", "BlockInvalidateCallback", "(", ")", ";", "}", "// Temporary fix for suspending call...
Initializes a drawable for display in this container. @param d The drawable to initialize.
[ "Initializes", "a", "drawable", "for", "display", "in", "this", "container", "." ]
7450ac880c8c9edf5d836cc0470fca01592d093e
https://github.com/DreaminginCodeZH/MaterialProgressBar/blob/7450ac880c8c9edf5d836cc0470fca01592d093e/library/src/main/java/me/zhanghai/android/materialprogressbar/internal/DrawableContainerCompat.java#L483-L525
65,277
DreaminginCodeZH/MaterialProgressBar
library/src/main/java/me/zhanghai/android/materialprogressbar/internal/AnimationScaleListDrawableCompat.java
AnimationScaleListDrawableCompat.onStateChange
@Override protected boolean onStateChange(int[] stateSet) { final boolean changed = super.onStateChange(stateSet); int idx = mAnimationScaleListState.getCurrentDrawableIndexBasedOnScale(); return selectDrawable(idx) || changed; }
java
@Override protected boolean onStateChange(int[] stateSet) { final boolean changed = super.onStateChange(stateSet); int idx = mAnimationScaleListState.getCurrentDrawableIndexBasedOnScale(); return selectDrawable(idx) || changed; }
[ "@", "Override", "protected", "boolean", "onStateChange", "(", "int", "[", "]", "stateSet", ")", "{", "final", "boolean", "changed", "=", "super", ".", "onStateChange", "(", "stateSet", ")", ";", "int", "idx", "=", "mAnimationScaleListState", ".", "getCurrentD...
Set the current drawable according to the animation scale. If scale is 0, then pick the static drawable, otherwise, pick the animatable drawable.
[ "Set", "the", "current", "drawable", "according", "to", "the", "animation", "scale", ".", "If", "scale", "is", "0", "then", "pick", "the", "static", "drawable", "otherwise", "pick", "the", "animatable", "drawable", "." ]
7450ac880c8c9edf5d836cc0470fca01592d093e
https://github.com/DreaminginCodeZH/MaterialProgressBar/blob/7450ac880c8c9edf5d836cc0470fca01592d093e/library/src/main/java/me/zhanghai/android/materialprogressbar/internal/AnimationScaleListDrawableCompat.java#L57-L62
65,278
OpenLiberty/open-liberty
dev/com.ibm.ws.wsoc/src/com/ibm/ws/wsoc/util/Utils.java
Utils.longToInt
public static int longToInt(long inLong) { if (inLong < Integer.MIN_VALUE) { return Integer.MIN_VALUE; } if (inLong > Integer.MAX_VALUE) { return Integer.MAX_VALUE; } return (int) inLong; }
java
public static int longToInt(long inLong) { if (inLong < Integer.MIN_VALUE) { return Integer.MIN_VALUE; } if (inLong > Integer.MAX_VALUE) { return Integer.MAX_VALUE; } return (int) inLong; }
[ "public", "static", "int", "longToInt", "(", "long", "inLong", ")", "{", "if", "(", "inLong", "<", "Integer", ".", "MIN_VALUE", ")", "{", "return", "Integer", ".", "MIN_VALUE", ";", "}", "if", "(", "inLong", ">", "Integer", ".", "MAX_VALUE", ")", "{", ...
convert unsigned long to signed int.
[ "convert", "unsigned", "long", "to", "signed", "int", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.wsoc/src/com/ibm/ws/wsoc/util/Utils.java#L46-L57
65,279
OpenLiberty/open-liberty
dev/com.ibm.ws.wsoc/src/com/ibm/ws/wsoc/util/Utils.java
Utils.getAllInterfaces
public static void getAllInterfaces(Class<?> classObject, ArrayList<Type> interfaces) { Type[] superInterfaces = classObject.getGenericInterfaces(); interfaces.addAll((Arrays.asList(superInterfaces))); // for cases where the extended class is defined with a Generic. Type tgs = classObje...
java
public static void getAllInterfaces(Class<?> classObject, ArrayList<Type> interfaces) { Type[] superInterfaces = classObject.getGenericInterfaces(); interfaces.addAll((Arrays.asList(superInterfaces))); // for cases where the extended class is defined with a Generic. Type tgs = classObje...
[ "public", "static", "void", "getAllInterfaces", "(", "Class", "<", "?", ">", "classObject", ",", "ArrayList", "<", "Type", ">", "interfaces", ")", "{", "Type", "[", "]", "superInterfaces", "=", "classObject", ".", "getGenericInterfaces", "(", ")", ";", "inte...
recursively gets all interfaces
[ "recursively", "gets", "all", "interfaces" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.wsoc/src/com/ibm/ws/wsoc/util/Utils.java#L309-L329
65,280
OpenLiberty/open-liberty
dev/com.ibm.ws.wsoc/src/com/ibm/ws/wsoc/util/Utils.java
Utils.truncateCloseReason
public static String truncateCloseReason(String reasonPhrase) { if (reasonPhrase != null) { byte[] reasonBytes = reasonPhrase.getBytes(Utils.UTF8_CHARSET); int len = reasonBytes.length; // Why 120? UTF-8 can take 4 bytes per character, so we either hit the boundary, or are...
java
public static String truncateCloseReason(String reasonPhrase) { if (reasonPhrase != null) { byte[] reasonBytes = reasonPhrase.getBytes(Utils.UTF8_CHARSET); int len = reasonBytes.length; // Why 120? UTF-8 can take 4 bytes per character, so we either hit the boundary, or are...
[ "public", "static", "String", "truncateCloseReason", "(", "String", "reasonPhrase", ")", "{", "if", "(", "reasonPhrase", "!=", "null", ")", "{", "byte", "[", "]", "reasonBytes", "=", "reasonPhrase", ".", "getBytes", "(", "Utils", ".", "UTF8_CHARSET", ")", ";...
close reason needs to be truncated to 123 UTF-8 encoded bytes
[ "close", "reason", "needs", "to", "be", "truncated", "to", "123", "UTF", "-", "8", "encoded", "bytes" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.wsoc/src/com/ibm/ws/wsoc/util/Utils.java#L488-L502
65,281
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/renderkit/html/HtmlMenuRendererBase.java
HtmlMenuRendererBase.getConverter
protected Converter getConverter(FacesContext facesContext, UIComponent component) { if (component instanceof UISelectMany) { return HtmlRendererUtils.findUISelectManyConverterFailsafe(facesContext, (UISelectMany) component); } else if (co...
java
protected Converter getConverter(FacesContext facesContext, UIComponent component) { if (component instanceof UISelectMany) { return HtmlRendererUtils.findUISelectManyConverterFailsafe(facesContext, (UISelectMany) component); } else if (co...
[ "protected", "Converter", "getConverter", "(", "FacesContext", "facesContext", ",", "UIComponent", "component", ")", "{", "if", "(", "component", "instanceof", "UISelectMany", ")", "{", "return", "HtmlRendererUtils", ".", "findUISelectManyConverterFailsafe", "(", "faces...
Gets the converter for the given component rendered by this renderer. @param facesContext @param component @return
[ "Gets", "the", "converter", "for", "the", "given", "component", "rendered", "by", "this", "renderer", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/renderkit/html/HtmlMenuRendererBase.java#L169-L182
65,282
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java
BaseMessagingEngineImpl.startConditional
public void startConditional() throws Exception { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "startConditional", this); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "Activating MBean for ME " + getName());...
java
public void startConditional() throws Exception { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "startConditional", this); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "Activating MBean for ME " + getName());...
[ "public", "void", "startConditional", "(", ")", "throws", "Exception", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc", ",", "\"startConditional\"", ",...
Start the Messaging Engine if it is enabled @throws Exception
[ "Start", "the", "Messaging", "Engine", "if", "it", "is", "enabled" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java#L333-L343
65,283
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java
BaseMessagingEngineImpl.okayToSendServerStarted
private boolean okayToSendServerStarted() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "okayToSendServerStarted", this); synchronized (lockObject) { if (!_sentServerStarted) { if ((_state == STATE_STARTED) && _mainImpl.isServ...
java
private boolean okayToSendServerStarted() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "okayToSendServerStarted", this); synchronized (lockObject) { if (!_sentServerStarted) { if ((_state == STATE_STARTED) && _mainImpl.isServ...
[ "private", "boolean", "okayToSendServerStarted", "(", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc", ",", "\"okayToSendServerStarted\"", ",", "thi...
Determine whether the conditions permitting a "server started" notification to be sent are met. @return boolean a value indicating whether the notification can be sent
[ "Determine", "whether", "the", "conditions", "permitting", "a", "server", "started", "notification", "to", "be", "sent", "are", "met", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java#L375-L389
65,284
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java
BaseMessagingEngineImpl.okayToSendServerStopping
private boolean okayToSendServerStopping() { // Removed the synchronized modifier of this method, as its only setting one private variable _sentServerStopping, // If its synchronized, then notification thread gets blocked here until JsActivationThread returns and so it doesnot set _sentServerStopping ...
java
private boolean okayToSendServerStopping() { // Removed the synchronized modifier of this method, as its only setting one private variable _sentServerStopping, // If its synchronized, then notification thread gets blocked here until JsActivationThread returns and so it doesnot set _sentServerStopping ...
[ "private", "boolean", "okayToSendServerStopping", "(", ")", "{", "// Removed the synchronized modifier of this method, as its only setting one private variable _sentServerStopping,", "// If its synchronized, then notification thread gets blocked here until JsActivationThread returns and so it doesno...
Determine whether the conditions permitting a "server stopping" notification to be sent are met. The ME state can be STARTED ,AUTOSTARTING or in STARTING state , to receive "server stopping" notification @return boolean a value indicating whether the notification can be sent
[ "Determine", "whether", "the", "conditions", "permitting", "a", "server", "stopping", "notification", "to", "be", "sent", "are", "met", ".", "The", "ME", "state", "can", "be", "STARTED", "AUTOSTARTING", "or", "in", "STARTING", "state", "to", "receive", "server...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java#L398-L415
65,285
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java
BaseMessagingEngineImpl.getEngineComponent
@SuppressWarnings("unchecked") public <EngineComponent> EngineComponent getEngineComponent(Class<EngineComponent> clazz) { String thisMethodName = "getEngineComponent"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, clazz); } ...
java
@SuppressWarnings("unchecked") public <EngineComponent> EngineComponent getEngineComponent(Class<EngineComponent> clazz) { String thisMethodName = "getEngineComponent"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, clazz); } ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "EngineComponent", ">", "EngineComponent", "getEngineComponent", "(", "Class", "<", "EngineComponent", ">", "clazz", ")", "{", "String", "thisMethodName", "=", "\"getEngineComponent\"", ";", "if", "(...
The purpose of this method is to get an engine component that can be cast using the specified class. The EngineComponent is not a class name, but represents the classes real type. @param <EngineComponent> The generic type of the desired engine component. @param clazz The class representing the engine component interfa...
[ "The", "purpose", "of", "this", "method", "is", "to", "get", "an", "engine", "component", "that", "can", "be", "cast", "using", "the", "specified", "class", ".", "The", "EngineComponent", "is", "not", "a", "class", "name", "but", "represents", "the", "clas...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java#L693-L720
65,286
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java
BaseMessagingEngineImpl.getEngineComponents
@SuppressWarnings("unchecked") public <EngineComponent> EngineComponent[] getEngineComponents(Class<EngineComponent> clazz) { String thisMethodName = "getEngineComponents"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, clazz); ...
java
@SuppressWarnings("unchecked") public <EngineComponent> EngineComponent[] getEngineComponents(Class<EngineComponent> clazz) { String thisMethodName = "getEngineComponents"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, clazz); ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "EngineComponent", ">", "EngineComponent", "[", "]", "getEngineComponents", "(", "Class", "<", "EngineComponent", ">", "clazz", ")", "{", "String", "thisMethodName", "=", "\"getEngineComponents\"", "...
The purpose of this method is to get an engine component that can be cast using the specified class. The EngineComponent is not a class name, but represents the classes real type. It is not possible to create an Array of a generic type without using reflection. @param <EngineComponent> The generic type of the desired ...
[ "The", "purpose", "of", "this", "method", "is", "to", "get", "an", "engine", "component", "that", "can", "be", "cast", "using", "the", "specified", "class", ".", "The", "EngineComponent", "is", "not", "a", "class", "name", "but", "represents", "the", "clas...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java#L738-L766
65,287
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java
BaseMessagingEngineImpl.getMeConfig
public final JsMEConfig getMeConfig() { String thisMethodName = "getMeConfig"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, this); SibTr.exit(tc, thisMethodName, _me); } return _me; }
java
public final JsMEConfig getMeConfig() { String thisMethodName = "getMeConfig"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, this); SibTr.exit(tc, thisMethodName, _me); } return _me; }
[ "public", "final", "JsMEConfig", "getMeConfig", "(", ")", "{", "String", "thisMethodName", "=", "\"getMeConfig\"", ";", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "{", "SibTr", ".", "e...
Returns a reference to this messaging engine's configuration. @return a reference to this messaging engine's configuration.
[ "Returns", "a", "reference", "to", "this", "messaging", "engine", "s", "configuration", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java#L809-L819
65,288
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java
BaseMessagingEngineImpl.getMessageProcessor
@Deprecated public JsEngineComponent getMessageProcessor(String name) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, "getMessageProcessor", this); SibTr.exit(tc, "getMessageProcessor", _messageProcessor); } return _messageProces...
java
@Deprecated public JsEngineComponent getMessageProcessor(String name) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, "getMessageProcessor", this); SibTr.exit(tc, "getMessageProcessor", _messageProcessor); } return _messageProces...
[ "@", "Deprecated", "public", "JsEngineComponent", "getMessageProcessor", "(", "String", "name", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "{", "SibTr", ".", "entry", "(", "t...
Gets the instance of the MP associated with this ME @deprecated @param name @return JsEngineComponent
[ "Gets", "the", "instance", "of", "the", "MP", "associated", "with", "this", "ME" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java#L852-L861
65,289
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java
BaseMessagingEngineImpl.resolveExceptionDestination
private void resolveExceptionDestination(BaseDestinationDefinition dd) { String thisMethodName = "resolveExceptionDestination"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, dd.getName()); } // If variable substitution s...
java
private void resolveExceptionDestination(BaseDestinationDefinition dd) { String thisMethodName = "resolveExceptionDestination"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, dd.getName()); } // If variable substitution s...
[ "private", "void", "resolveExceptionDestination", "(", "BaseDestinationDefinition", "dd", ")", "{", "String", "thisMethodName", "=", "\"resolveExceptionDestination\"", ";", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabl...
Resolve, if necessary, a variable Exception Destination name in the specified DD to it's runtime value. @param dd the DestinationDefinition to be checked, and modified
[ "Resolve", "if", "necessary", "a", "variable", "Exception", "Destination", "name", "in", "the", "specified", "DD", "to", "it", "s", "runtime", "value", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java#L1022-L1041
65,290
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java
BaseMessagingEngineImpl.getSIBDestinationByUuid
BaseDestinationDefinition getSIBDestinationByUuid(String bus, String key, boolean newCache) throws SIBExceptionDestinationNotFound, SIBExceptionBase { String thisMethodName = "getSIBDestinationByUuid"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisM...
java
BaseDestinationDefinition getSIBDestinationByUuid(String bus, String key, boolean newCache) throws SIBExceptionDestinationNotFound, SIBExceptionBase { String thisMethodName = "getSIBDestinationByUuid"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisM...
[ "BaseDestinationDefinition", "getSIBDestinationByUuid", "(", "String", "bus", ",", "String", "key", ",", "boolean", "newCache", ")", "throws", "SIBExceptionDestinationNotFound", ",", "SIBExceptionBase", "{", "String", "thisMethodName", "=", "\"getSIBDestinationByUuid\"", ";...
Accessor method to return a destination definition. @param bus @param key @param newCache @return the destination cache
[ "Accessor", "method", "to", "return", "a", "destination", "definition", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java#L1133-L1157
65,291
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java
BaseMessagingEngineImpl.getState
public final String getState() { String thisMethodName = "getState"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, this); SibTr.exit(tc, thisMethodName, states[_state]); } return states[_state]; }
java
public final String getState() { String thisMethodName = "getState"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, this); SibTr.exit(tc, thisMethodName, states[_state]); } return states[_state]; }
[ "public", "final", "String", "getState", "(", ")", "{", "String", "thisMethodName", "=", "\"getState\"", ";", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "{", "SibTr", ".", "entry", "...
Get the state of this ME @return String
[ "Get", "the", "state", "of", "this", "ME" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java#L1228-L1238
65,292
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java
BaseMessagingEngineImpl.isStarted
public final boolean isStarted() { String thisMethodName = "isStarted"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, this); } boolean retVal = (_state == STATE_STARTED); if (TraceComponent.isAnyTracingEnabled()...
java
public final boolean isStarted() { String thisMethodName = "isStarted"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, this); } boolean retVal = (_state == STATE_STARTED); if (TraceComponent.isAnyTracingEnabled()...
[ "public", "final", "boolean", "isStarted", "(", ")", "{", "String", "thisMethodName", "=", "\"isStarted\"", ";", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "{", "SibTr", ".", "entry", ...
Returns an indication of whether this ME is started or not @return true if this messaging egine is started; else false.
[ "Returns", "an", "indication", "of", "whether", "this", "ME", "is", "started", "or", "not" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java#L1294-L1309
65,293
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java
BaseMessagingEngineImpl.addLocalizationPoint
final boolean addLocalizationPoint(LWMConfig lp, DestinationDefinition dd) { String thisMethodName = "addLocalizationPoint"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, lp); } boolean success = _localizer.addLocalizati...
java
final boolean addLocalizationPoint(LWMConfig lp, DestinationDefinition dd) { String thisMethodName = "addLocalizationPoint"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, lp); } boolean success = _localizer.addLocalizati...
[ "final", "boolean", "addLocalizationPoint", "(", "LWMConfig", "lp", ",", "DestinationDefinition", "dd", ")", "{", "String", "thisMethodName", "=", "\"addLocalizationPoint\"", ";", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", ...
Pass the request to add a new localization point onto the localizer object. @param lp localization point definition @return boolean success Whether the LP was successfully added
[ "Pass", "the", "request", "to", "add", "a", "new", "localization", "point", "onto", "the", "localizer", "object", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java#L1473-L1487
65,294
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java
BaseMessagingEngineImpl.alterLocalizationPoint
final void alterLocalizationPoint(BaseDestination dest,LWMConfig lp) { String thisMethodName = "alterLocalizationPoint"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, lp); } try { _localizer.alterLocalization...
java
final void alterLocalizationPoint(BaseDestination dest,LWMConfig lp) { String thisMethodName = "alterLocalizationPoint"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, lp); } try { _localizer.alterLocalization...
[ "final", "void", "alterLocalizationPoint", "(", "BaseDestination", "dest", ",", "LWMConfig", "lp", ")", "{", "String", "thisMethodName", "=", "\"alterLocalizationPoint\"", ";", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "is...
Pass the request to alter a localization point onto the localizer object. @param lp localization point definition
[ "Pass", "the", "request", "to", "alter", "a", "localization", "point", "onto", "the", "localizer", "object", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java#L1495-L1512
65,295
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java
BaseMessagingEngineImpl.deleteLocalizationPoint
final void deleteLocalizationPoint(JsBus bus, LWMConfig dest) { String thisMethodName = "deleteLocalizationPoint"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, dest); } try { _localizer.deleteLocalizationPoi...
java
final void deleteLocalizationPoint(JsBus bus, LWMConfig dest) { String thisMethodName = "deleteLocalizationPoint"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, dest); } try { _localizer.deleteLocalizationPoi...
[ "final", "void", "deleteLocalizationPoint", "(", "JsBus", "bus", ",", "LWMConfig", "dest", ")", "{", "String", "thisMethodName", "=", "\"deleteLocalizationPoint\"", ";", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEn...
Pass the request to delete a localization point onto the localizer object. @param lp localization point definition
[ "Pass", "the", "request", "to", "delete", "a", "localization", "point", "onto", "the", "localizer", "object", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java#L1519-L1540
65,296
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java
BaseMessagingEngineImpl.setLPConfigObjects
final void setLPConfigObjects(List config) { String thisMethodName = "setLPConfigObjects"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, "Number of LPs =" + config.size()); } _lpConfig.clear(); _lpConfig.addAll(c...
java
final void setLPConfigObjects(List config) { String thisMethodName = "setLPConfigObjects"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, "Number of LPs =" + config.size()); } _lpConfig.clear(); _lpConfig.addAll(c...
[ "final", "void", "setLPConfigObjects", "(", "List", "config", ")", "{", "String", "thisMethodName", "=", "\"setLPConfigObjects\"", ";", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "{", "S...
Update the cache of localization point config objects. This method is used by dynamic config to refresh the cache. @param config The _lpConfig to set.
[ "Update", "the", "cache", "of", "localization", "point", "config", "objects", ".", "This", "method", "is", "used", "by", "dynamic", "config", "to", "refresh", "the", "cache", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java#L1565-L1579
65,297
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java
BaseMessagingEngineImpl.isEventNotificationPropertySet
public boolean isEventNotificationPropertySet() { String thisMethodName = "isEventNotificationPropertySet"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, this); } boolean enabled = true; if (TraceComponent.isAny...
java
public boolean isEventNotificationPropertySet() { String thisMethodName = "isEventNotificationPropertySet"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, this); } boolean enabled = true; if (TraceComponent.isAny...
[ "public", "boolean", "isEventNotificationPropertySet", "(", ")", "{", "String", "thisMethodName", "=", "\"isEventNotificationPropertySet\"", ";", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "{"...
Test whether the Event Notification property has been set. This method resolves the setting for the specific ME and the setting for the bus.
[ "Test", "whether", "the", "Event", "Notification", "property", "has", "been", "set", ".", "This", "method", "resolves", "the", "setting", "for", "the", "specific", "ME", "and", "the", "setting", "for", "the", "bus", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java#L1585-L1600
65,298
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java
BaseMessagingEngineImpl.getMainImpl
public JsMainImpl getMainImpl() { String thisMethodName = "getMainImpl"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, this); SibTr.exit(tc, thisMethodName, _mainImpl); } return _mainImpl; }
java
public JsMainImpl getMainImpl() { String thisMethodName = "getMainImpl"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, this); SibTr.exit(tc, thisMethodName, _mainImpl); } return _mainImpl; }
[ "public", "JsMainImpl", "getMainImpl", "(", ")", "{", "String", "thisMethodName", "=", "\"getMainImpl\"", ";", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "{", "SibTr", ".", "entry", "(...
Returns a reference to the repository service. This is used in conjunction with ConfigRoot to access EMF configuration documents. @return Reference to the repository service.
[ "Returns", "a", "reference", "to", "the", "repository", "service", ".", "This", "is", "used", "in", "conjunction", "with", "ConfigRoot", "to", "access", "EMF", "configuration", "documents", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java#L1608-L1618
65,299
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java
BaseMessagingEngineImpl.loadClass
protected final JsEngineComponent loadClass(String className, int stopSeq, boolean reportError) { String thisMethodName = "loadClass"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, new Object[] { className, Integer.toString(stopSeq), Boo...
java
protected final JsEngineComponent loadClass(String className, int stopSeq, boolean reportError) { String thisMethodName = "loadClass"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, new Object[] { className, Integer.toString(stopSeq), Boo...
[ "protected", "final", "JsEngineComponent", "loadClass", "(", "String", "className", ",", "int", "stopSeq", ",", "boolean", "reportError", ")", "{", "String", "thisMethodName", "=", "\"loadClass\"", ";", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ...
Load the named class and add it to the list of engine components. @param className Fully qualified class name of class to load. @param stopSeq @param reportError Set to false for classes we don't care about. @return
[ "Load", "the", "named", "class", "and", "add", "it", "to", "the", "list", "of", "engine", "components", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java#L1695-L1755