/** * {@inheritDoc} */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } JSFunctionExecution other = (JSFunctionExecution) obj; if (this.functionName == null) { if (other.functionName != null) { return false; } } else if (!this.functionName.equals(other.functionName)) { return false; } return true; }
/** * {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = (prime * result) + ((this.url == null) ? 0 : this.url.hashCode()); return result; }
/** * {@inheritDoc} */ @Override public boolean isCaller() { return details.isExternalCall(); }
/** * Sets teh details object. Should only be called once! * * @param eumDetails * the details. */ void setDetails(AbstractEUMSpanDetails eumDetails) { this.details = eumDetails; eumDetails.setOwningSpan(this); if (eumDetails.isAsyncCall() && !isRoot()) { setReferenceType(References.FOLLOWS_FROM); } else { setReferenceType(References.CHILD_OF); } this.setPropagationType(eumDetails.getPropagationType()); }
@SuppressWarnings("unchecked") @Override public void onRemoval(RemovalNotification<AbstractEUMSpanDetails, Pair<Boolean, AbstractEUMPointBuilder>> notification) { AbstractEUMSpanDetails element = notification.getKey(); synchronized (element) { AbstractEUMPointBuilder builder = notification.getValue().getSecond(); Long sessId = element.getOwningSpan().getSessionId(); Long tabId = element.getOwningSpan().getTabId(); Pair<Long, Long> plrSessionTabId = new Pair<Long, Long>(sessId, tabId); missingSessionInfosMap.remove(sessId, element); missingPageLoadRequestsMap.remove(plrSessionTabId, element); // Force a write even if data is still missing in case of an cache // eviction because of the timeout if (notification.getCause() != RemovalCause.EXPLICIT) { PageLoadRequest plr = pageLoadRequestCache.getIfPresent(plrSessionTabId); UserSessionInfo sessionInfo = sessionInfoCache.getIfPresent(sessId); dataPointsToWrite.addAll(builder.build(sessionInfo, plr, element)); } } } }).build();
/** * {@inheritDoc} */ @Override public void deserializationComplete(Beacon beacon) { sessionId = beacon.getSessionID(); tabId = beacon.getTabID(); activeAgentModules = beacon.getActiveAgentModules(); details.deserializationComplete(beacon); Map<String, String> allTags = new HashMap<String, String>(); details.collectTags(allTags); this.addAllTags(allTags); }
/** * {@inheritDoc} */ @Override public EUMSpan read(Kryo kryo, Input input, Class<EUMSpan> type) { EUMSpan read = super.read(kryo, input, type); read.getDetails().setOwningSpan(read); return read; } }, nextRegistrationId++);
UserSessionInfo sessInfo = null; Long sessId = element.getOwningSpan().getSessionId(); Long tabId = element.getOwningSpan().getTabId(); Pair<Long, Long> plrSessionTabId = new Pair<Long, Long>(sessId, tabId);
protected Beacon generateBeacon(AbstractEUMSpanDetails elementToSend, boolean containsSessionInfo, boolean containsPLR, String modules) { ArrayList<EUMBeaconElement> data = new ArrayList<>(); if (containsSessionInfo) { data.add(sessionInfo); } if (containsPLR) { data.add(pageLoadRequest.getOwningSpan()); when(pageLoadRequest.getOwningSpan().getActiveAgentModules()).thenReturn(modules); } if (elementToSend != null) { EUMSpan span = Mockito.mock(EUMSpan.class); when(span.getTabId()).thenReturn(TAB_ID); when(span.getSessionId()).thenReturn(SESSION_ID); when(span.getDetails()).thenReturn(elementToSend); if (elementToSend instanceof DummyBeaconElement) { ((DummyBeaconElement) elementToSend).owner = span; } else { when(elementToSend.getOwningSpan()).thenReturn(span); } when(span.getActiveAgentModules()).thenReturn(modules); data.add(span); } return new Beacon(SESSION_ID, TAB_ID, modules, data); }
/** * {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = (prime * result) + ((this.functionName == null) ? 0 : this.functionName.hashCode()); return result; }
/** * {@inheritDoc} */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } AbstractRequest other = (AbstractRequest) obj; if (this.url == null) { if (other.url != null) { return false; } } else if (!this.url.equals(other.url)) { return false; } return true; } }
/** * {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = (prime * result) + ((this.activeAgentModules == null) ? 0 : this.activeAgentModules.hashCode()); result = (prime * result) + ((this.details == null) ? 0 : this.details.hashCode()); result = (prime * result) + (int) (this.sessionId ^ (this.sessionId >>> 32)); result = (prime * result) + (int) (this.tabId ^ (this.tabId >>> 32)); return result; }
return false; } else if (!this.details.equals(other.details)) { return false;