code
stringlengths
73
34.1k
label
stringclasses
1 value
public static <K, V> Map<K, V> zipMap(Iterable<K> keys, Iterable<V> values) { Map<K, V> retVal = new LinkedHashMap<>(); Iterator<K> keysIter = keys.iterator(); Iterator<V> valsIter = values.iterator(); while (keysIter.hasNext()) { final K key = keysIter.next(); Preconditions.checkArgument...
java
public static <K, V> Map<K, V> zipMapPartial(Iterable<K> keys, Iterable<V> values) { Map<K, V> retVal = new LinkedHashMap<>(); Iterator<K> keysIter = keys.iterator(); Iterator<V> valsIter = values.iterator(); while (keysIter.hasNext()) { final K key = keysIter.next(); if(valsIter.hasNex...
java
public static long copyToFileAndClose(InputStream is, File file, long timeout) throws IOException, TimeoutException { file.getParentFile().mkdirs(); try (OutputStream os = new BufferedOutputStream(new FileOutputStream(file))) { final long retval = copyWithTimeout(is, os, timeout); // Workarround f...
java
public static long copyWithTimeout(InputStream is, OutputStream os, long timeout) throws IOException, TimeoutException { byte[] buffer = new byte[DEFAULT_BUFFER_SIZE]; int n; long startTime = System.currentTimeMillis(); long size = 0; while (-1 != (n = is.read(buffer))) { if (System.currentT...
java
public static FileUtils.FileCopyResult unzip(final File pulledFile, final File outDir) throws IOException { if (!(outDir.exists() && outDir.isDirectory())) { throw new ISE("outDir[%s] must exist and be a directory", outDir); } log.info("Unzipping file[%s] to [%s]", pulledFile, outDir); final Fil...
java
public static void scheduleWithFixedDelay(ScheduledExecutorService exec, Duration delay, Runnable runnable) { scheduleWithFixedDelay(exec, delay, delay, runnable); }
java
public static void scheduleWithFixedDelay( final ScheduledExecutorService exec, final Duration initialDelay, final Duration delay, final Callable<Signal> callable ) { log.debug("Scheduling repeatedly: %s with delay %s", callable, delay); exec.schedule( new Runnable() ...
java
public static void scheduleAtFixedRate(ScheduledExecutorService exec, Duration rate, Runnable runnable) { scheduleAtFixedRate(exec, rate, rate, runnable); }
java
void validateAndPrepare(Message message, Address[] addresses) throws MessagingException { if (message.getFrom() == null || message.getFrom().length == 0) { fail(message, addresses, "No or empty FROM address set!"); } if (addresses.length == 0) { fail(message, addresses, "...
java
static Map<String,Collection<String>> extractTextParts(Multipart multiPart) throws MessagingException, IOException { HashMap<String,Collection<String>> bodies = new HashMap<>(); for(int i = 0; i < multiPart.getCount(); i++) { checkPartForTextType(bodies, multiPart.getBodyPart(i)); } ...
java
private static void checkPartForTextType(HashMap<String, Collection<String>> bodies, Part part) throws IOException, MessagingException { Object content = part.getContent(); if (content instanceof CharSequence) { String ct = part.getContentType(); Collection<String> value = bodies...
java
public DirectoryPollerBuilder setPollingInterval(long interval, TimeUnit timeUnit) { if (interval < 0) { throw new IllegalArgumentException("Argument 'interval' is negative: " + interval); } pollingIntervalInMillis = timeUnit.toMillis(interval); return this; }
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "DELEGATE") public org.openprovenance.prov.model.QualifiedName getDelegate() { return delegate; }
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "RESPONSIBLE") public org.openprovenance.prov.model.QualifiedName getResponsible() { return responsible; }
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "ACTIVITY") public org.openprovenance.prov.model.QualifiedName getActivity() { return activity; }
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "AGENT") public org.openprovenance.prov.model.QualifiedName getAgent() { return agent; }
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "SPECIFICENTITY_MENTIONOF_PK") public org.openprovenance.prov.model.QualifiedName getSpecificEntity() { return specificEntity; }
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "GENERALENTITY_MENTIONOF_PK") public org.openprovenance.prov.model.QualifiedName getGeneralEntity() { return generalEntity; }
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "BUNDLE") public org.openprovenance.prov.model.QualifiedName getBundle() { return bundle; }
java
public String buildAcceptHeader() { StringBuffer mimetypes = new StringBuffer(); Enumeration<ProvFormat> e = mimeTypeMap.keys(); String sep = ""; while (e.hasMoreElements()) { ProvFormat f = e.nextElement(); if (isInputFormat(f)) { // careful - can...
java
public URLConnection connectWithRedirect(URL theURL) throws IOException { URLConnection conn = null; String accept_header = buildAcceptHeader(); int redirect_count = 0; boolean done = false; while (!done) { if (theURL.getProtocol().equals("file")) { ...
java
public String convertExtensionToMediaType(String extension) { ProvFormat format = extensionRevMap.get(extension); if (format == null) return null; return mimeTypeMap.get(format); }
java
public String getExtension(ProvFormat format) { String extension = UNKNOWN; if (format != null) { extension = extensionMap.get(format); } return extension; }
java
String getOption(String[] options, int index) { if ((options != null) && (options.length > index)) { return options[index]; } return null; }
java
public List<Variant> getVariants() { List<Variant> vs = new ArrayList<Variant>(); for (Map.Entry<String, ProvFormat> entry : mimeTypeRevMap.entrySet()) { if (isOutputFormat(entry.getValue())) { String[] parts = entry.getKey().split("/"); MediaType m = new Medi...
java
public Boolean isInputFormat(ProvFormat format) { ProvFormatType t = provTypeMap.get(format); return (t.equals(ProvFormatType.INPUT) || t.equals(ProvFormatType.INPUTOUTPUT)); }
java
public Boolean isOutputFormat(ProvFormat format) { ProvFormatType t = provTypeMap.get(format); return (t.equals(ProvFormatType.OUTPUT) || t.equals(ProvFormatType.INPUTOUTPUT)); }
java
public Object loadProvUnknownGraph(String filename) { try { Utility u = new Utility(); CommonTree tree = u.convertASNToTree(filename); Object o = u.convertTreeToJavaBean(tree, pFactory); if (o != null) { return o; } } catch (Re...
java
public Document readDocument(String url) { try { URL theURL = new URL(url); URLConnection conn = connectWithRedirect(theURL); if (conn == null) return null; ProvFormat format = null; String content_type = conn.getContentType(); ...
java
public Document readDocumentFromFile(String filename) { ProvFormat format = getTypeForFile(filename); if (format == null) { throw new InteropException("Unknown output file format: " + filename); } return readDocumentFromFile(filena...
java
public Document readDocumentFromFile(String filename, ProvFormat format) { try { switch (format) { case DOT: case JPEG: case PNG: case SVG: throw new UnsupportedOperationException(); // we don't load PROV ...
java
public List<org.openprovenance.prov.model.Other> getOther() { if (other == null) { other = new ArrayList<org.openprovenance.prov.model.Other>(); } return this.other; }
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "DICTIONARY__DICTIONARYMEMBER_0") public org.openprovenance.prov.model.QualifiedName getDictionary() { return dictionary; }
java
@Transient public List<org.openprovenance.prov.model.Entry> getKeyEntityPair() { if (keyEntityPair == null) { keyEntityPair = new ArrayList<org.openprovenance.prov.model.Entry>(); } return this.keyEntityPair; }
java
protected Key valueToKey(Value value) { if (value instanceof Resource) { return pFactory.newKey(convertResourceToQualifiedName((Resource) value), name.PROV_QUALIFIED_NAME); } else if (value instanceof Literal) { Literal lit=(Literal) value; QualifiedName type; Qualified...
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "COLLECTION") public org.openprovenance.prov.model.QualifiedName getCollection() { return collection; }
java
@ManyToMany(targetEntity = AStatement.class, cascade = { CascadeType.ALL }) @JoinTable(name = "BUNDLE_STATEMENT_JOIN", joinColumns = { @JoinColumn(name = "BUNDLE") }, inverseJoinColumns = { @JoinColumn(name = "STATEMENT") }) public List<Statement> getStatement() { if ...
java
@ManyToMany(targetEntity = AStatement.class, cascade = { CascadeType.ALL }) @JoinTable(name = "DOCUMENT_STATEMENT_JOIN", joinColumns = { @JoinColumn(name = "DOCUMENT") }, inverseJoinColumns = { @JoinColumn(name = "STATEMENT") }) public List<StatementOrBundle> getStatementOrBu...
java
@Id @Column(name = "PK") @GeneratedValue(strategy = GenerationType.AUTO) public Long getPk() { return pk; }
java
public Agent newAgent(Agent a) { Agent res = newAgent(a.getId()); res.getType().addAll(a.getType()); res.getLabel().addAll(a.getLabel()); return res; }
java
public Entity newEntity(Entity e) { Entity res = newEntity(e.getId()); res.getOther().addAll(e.getOther()); res.getType().addAll(e.getType()); res.getLabel().addAll(e.getLabel()); res.getLocation().addAll(e.getLocation()); return res; }
java
public Entry newEntry(Key key, QualifiedName entity) { Entry res = of.createEntry(); res.setKey(key); res.setEntity(entity); return res; }
java
public void setKey(org.openprovenance.prov.model.Key value) { this.key = (org.openprovenance.prov.sql.Key)value; }
java
public List<org.openprovenance.prov.model.Key> getKey() { if (key == null) { key=AttributeList.populateKnownAttributes(this,all, org.openprovenance.prov.model.Key.class); } return this.key; }
java
final public QualifiedName stringToQualifiedName(String str, org.w3c.dom.Element el) { if (str == null) return null; int index = str.indexOf(':'); if (index == -1) { QualifiedName qn = pFactory.newQualifiedName(el.lookupNamespaceURI(null), // find default namespace ...
java
public Document parseRDF(InputStream inputStream, RDFFormat format, String baseuri) throws RDFParseException, RDFHandlerException, IOException { ...
java
public Document parseRDF(InputStream inputStream, RDFParser rdfParser, String baseuri) throws IOException, RDFParseException, RDFHandlerException { ...
java
public boolean hasNoTime(Statement o) { if (o instanceof HasTime) return false; if (o instanceof Activity) return false; return true; /* OLD Definition return (o instanceof WasDerivedFrom) || (o instanceof ActedOnBehalfOf) || (o instanceof WasInform...
java
public String selectColor(List<String> colors) { String tr="transparent"; for (String c: colors) { if (!(c.equals(tr))) return c; } return tr; }
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "ALTERNATE1") public org.openprovenance.prov.model.QualifiedName getAlternate1() { return alternate1; }
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "ALTERNATE2") public org.openprovenance.prov.model.QualifiedName getAlternate2() { return alternate2; }
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "PLAN") public org.openprovenance.prov.model.QualifiedName getPlan() { return plan; }
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "INFLUENCEE") public org.openprovenance.prov.model.QualifiedName getInfluencee() { return influencee; }
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "INFLUENCER") public org.openprovenance.prov.model.QualifiedName getInfluencer() { return influencer; }
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "GENERATED_ENTITY") public org.openprovenance.prov.model.QualifiedName getGeneratedEntity() { return generatedEntity; }
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "USED_ENTITY") public org.openprovenance.prov.model.QualifiedName getUsedEntity() { return usedEntity; }
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "GENERATION") public org.openprovenance.prov.model.QualifiedName getGeneration() { return generation; }
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "USAGE") public org.openprovenance.prov.model.QualifiedName getUsage() { return usage; }
java
@Embedded public AValue getValueItem() { if ((avalue==null) && (value!=null)) { if (type==null) { avalue=SQLValueConverter.convertToAValue(vc.getXsdType(value), value); } else if (value instanceof LangString) { avalue=SQLValueConverter.convertToAValue(type, ((LangString) value).getV...
java
public void setValueItem(AValue value) { this.avalue=value; if (value!=null) { Object o=SQLValueConverter.convertFromAValue(value); if (o!=null) { if (o instanceof QualifiedName) { this.value=o; } else { this.value = o.toString(); } } } }
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "TRIGGER_") public org.openprovenance.prov.model.QualifiedName getTrigger() { return trigger; }
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "STARTER") public org.openprovenance.prov.model.QualifiedName getStarter() { return starter; }
java
public Object convertJavaBeanToJavaBean(Document doc, ProvFactory pFactory) { BeanTraversal bt=new BeanTraversal(pFactory, pFactory); Document o=bt.doAction(doc); return o; }
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "QN") public QualifiedName getQualifiedName() { return qualifiedName; }
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "ENDER") public org.openprovenance.prov.model.QualifiedName getEnder() { return ender; }
java
public void updateNamespaces(Document document) { Namespace rootNamespace = Namespace.gatherNamespaces(document); document.setNamespace(rootNamespace); for (org.openprovenance.prov.model.Bundle bu: utils.getBundle(document)) { Namespace ns=bu.getNamespace(); if (ns!=null) { ns.setParent(rootNamespace); ...
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "INFORMED") public org.openprovenance.prov.model.QualifiedName getInformed() { return informed; }
java
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "INFORMANT") public org.openprovenance.prov.model.QualifiedName getInformant() { return informant; }
java
public <T extends Relation> T add(T statement, int num, Collection<T> anonRelationCollection, HashMap<QualifiedName, Collection<T>> namedRelationMap, HashMap<QualifiedName,...
java
public Object marshal(org.openprovenance.prov.model.Attribute attribute) { return DOMProcessing.marshalAttribute(attribute); }
java
protected PGPSecretKey retrieveSecretKey(PGPSecretKeyRingCollection secretKeyRingCollection, KeyFilter<PGPSecretKey> keyFilter) throws PGPException { LOGGER.trace("retrieveSecretKey(PGPSecretKeyRingCollection, KeyFilter<PGPSecretKey>)"); LOGGER.trace("Secret KeyRing Collection: {}, Key Filter: {}", secretKeyRin...
java
protected PGPSecretKey findSecretKey(InputStream secretKey, final long keyId) throws IOException, PGPException { LOGGER.trace("findSecretKey(InputStream, long)"); LOGGER.trace("Secret Key: {}, Key ID: {}", secretKey == null ? "not set" : "set", keyId); return findSecretKey(secretKey, new KeyFilter<PGPSecret...
java
protected PGPSecretKey findSecretKey(InputStream secretKey, KeyFilter<PGPSecretKey> keyFilter) throws IOException, PGPException { LOGGER.trace("findSecretKey(InputStream, KeyFilter<PGPSecretKey>)"); PGPSecretKey result = null; LOGGER.debug("Wrapping secret key stream in ArmoredInputStream"); try( InputS...
java
protected PGPPrivateKey findPrivateKey(PGPSecretKey pgpSecretKey, String password) throws PGPException { LOGGER.trace("findPrivateKey(PGPSecretKey, String)"); LOGGER.trace("Secret Key: {}, Password: {}", pgpSecretKey == null ? "not set" : "set", password == null ? "not set" : "********"); PGPPrivateKey resu...
java
protected PGPPublicKey findPublicKey(InputStream publicKey, KeyFilter<PGPPublicKey> keyFilter ) { LOGGER.trace("findPublicKey(InputStream, KeyFilter<PGPPublicKey>)"); LOGGER.trace("Public Key: {}, Key Filter: {}", publicKey == null ? "not set" : "set", keyFilter == null ? "not set" : "set"); return retrieve...
java
protected PGPPublicKey retrievePublicKey(PGPPublicKeyRing publicKeyRing, KeyFilter<PGPPublicKey> keyFilter) { LOGGER.trace("retrievePublicKey(PGPPublicKeyRing, KeyFilter<PGPPublicKey>)"); PGPPublicKey result = null; Iterator<PGPPublicKey> publicKeyIterator = publicKeyRing.getPublicKeys(); LOGGER.debug("...
java
protected PGPPublicKeyRing readPublicKeyRing(InputStream publicKey) { LOGGER.trace("readPublicKeyRing(InputStream)"); PGPPublicKeyRing result = null; LOGGER.debug("Wrapping public key stream in decoder stream"); try( InputStream decoderStream = PGPUtil.getDecoderStream(publicKey) ) { LOGGER.debug(...
java
public static void copy(InputStream inputStream, OutputStream outputStream) throws IOException { LOGGER.trace("copy(InputStream, OutputStream)"); copy(inputStream, outputStream, new byte[BUFFER_SIZE]); }
java
public static void copy(InputStream inputStream, OutputStream outputStream, byte[] buffer) throws IOException { LOGGER.trace("copy(InputStream, OutputStream, byte[])"); copy(inputStream, outputStream, buffer, null); }
java
public static void copy(InputStream inputStream, final OutputStream outputStream, byte[] buffer, final StreamHandler addtionalHandling) throws IOException { LOGGER.trace("copy(InputStream, OutputStream, byte[], StreamHandler)"); LOGGER.debug("buffer size: {} bytes", (buffer!=null) ? buffer.length : "null"); ...
java
public static void process(InputStream inputStream, StreamHandler handler) throws IOException { LOGGER.trace("process(InputStream, StreamHandler)"); process(inputStream, handler, new byte[BUFFER_SIZE]); }
java
public static void process(InputStream inputStream, StreamHandler handler, byte[] buffer) throws IOException { LOGGER.trace("process(InputStream, StreamHandler, byte[])"); LOGGER.debug("buffer size: {} bytes", buffer != null ? buffer.length : "null"); int read = -1; while( (read = inputStream.read(buffe...
java
private PGPKeyRingGenerator createKeyRingGenerator(String userId, String password, int keySize) { LOGGER.trace("createKeyRingGenerator(String, String, int)"); LOGGER.trace("User ID: {}, Password: {}, Key Size: {}", userId, password == null ? "not set" : "********", keySize); PGPKeyRingGenerator generator = ...
java
@CacheControl(policy = { CachePolicy.MUST_REVALIDATE }, maxAge = 15 * 60) @RequestMapping("/directions.do") public String handleProducDirectionsRequest(Model model) { model.addAttribute("pageName", "Directions"); return "page"; }
java
@CacheControl(policy = { CachePolicy.PRIVATE, CachePolicy.MUST_REVALIDATE }) @RequestMapping("/account.do") public String handleAccountRequest(Model model) { model.addAttribute("pageName", "Your Account"); return "page"; }
java
public void makeDisabled(boolean b) throws IOException { if (disabled == b) { return; } this.disabled = b; Collection<P> projects = getItems(); // Manage the sub-projects if (b) { /* * Populate list only if it is empty. Running this...
java
protected void init() { for (int i = 0; i < config.getFilter().getInclusions().size(); i++) { inclusions.add(Pattern.compile(config.getFilter().getInclusions().get(i)).asPredicate()); } for (int i = 0; i < config.getFilter().getExclusions().size(); i++) { exclusions.add(P...
java
public boolean isIncluded(String endpoint) { for (int i = 0; i < inclusions.size(); i++) { if (inclusions.get(i).test(endpoint)) { return true; } } return false; }
java
public boolean isExcluded(String endpoint) { for (int i = 0; i < exclusions.size(); i++) { if (exclusions.get(i).test(endpoint)) { return true; } } return false; }
java
public Message addContent(String name, String type, String value) { content.put(name, new Content(type, value)); return this; }
java
public FragmentBuilder getFragmentBuilder() { FragmentBuilder builder = builders.get(); if (builder == null) { if (log.isLoggable(Level.FINEST)) { log.finest("Creating new FragmentBuilder"); } builder = new FragmentBuilder(); builders.set(...
java
public void setFragmentBuilder(FragmentBuilder builder) { FragmentBuilder currentBuilder = builders.get(); if (currentBuilder == null && builder != null) { int currentCount = threadCounter.incrementAndGet(); int builderCount = builder.incrementThreadCount(); if (log....
java
public void clear() { int currentCount = threadCounter.decrementAndGet(); if (log.isLoggable(Level.FINEST)) { log.finest("Clear: Disassociate Thread from FragmentBuilder(1): current thread count=" + currentCount); synchronized (threadNames) { threadNames.remove(Th...
java
protected static List<Trace> internalQuery(ElasticsearchClient client, String tenantId, Criteria criteria) { List<Trace> ret = new ArrayList<Trace>(); String index = client.getIndex(tenantId); try { RefreshRequestBuilder refreshRequestBuilder = client.getClient().admin(...
java
public static void decodeProperties(Set<PropertyCriteria> properties, String encoded) { if (encoded != null && !encoded.trim().isEmpty()) { StringTokenizer st = new StringTokenizer(encoded, ","); while (st.hasMoreTokens()) { String token = st.nextToken(); ...
java
public static void decodeCorrelationIdentifiers(Set<CorrelationIdentifier> correlations, String encoded) { if (encoded != null && !encoded.trim().isEmpty()) { StringTokenizer st = new StringTokenizer(encoded, ","); while (st.hasMoreTokens()) { String token = st.nextToken(...
java
public static Reference findPrimaryReference(List<Reference> references) { List<Reference> followsFrom = references.stream() .filter(ref -> References.FOLLOWS_FROM.equals(ref.getReferenceType()) && ref.getReferredTo() instanceof APMSpan) .collect(Collector...
java
protected void initTopLevelState(APMSpan topSpan, TraceRecorder recorder, ContextSampler sampler) { nodeBuilder = new NodeBuilder(); traceContext = new TraceContext(topSpan, nodeBuilder, recorder, sampler); }
java
protected void initFromExtractedTraceState(APMSpanBuilder builder, TraceRecorder recorder, Reference ref, ContextSampler sampler) { APMSpanBuilder parentBuilder = (APMSpanBuilder) ref.getReferredTo(); initTopLevelState(this, recorder, sampler); // Check for passed state if (parentBuild...
java
protected void initChildOf(APMSpanBuilder builder, Reference ref) { APMSpan parent = (APMSpan) ref.getReferredTo(); if (parent.getNodeBuilder() != null) { nodeBuilder = new NodeBuilder(parent.getNodeBuilder()); traceContext = parent.traceContext; // As it is not pos...
java