/** * Returns the current time encapsulated in a Time type * * @return The current time */ public static Time getTimestampMillis() { return new Time(System.currentTimeMillis()); }
public CheckLinkEvaluation(CheckResult lastCheckResult) { this.evaluationResults = new ArrayList<EvaluationResult>(); this.lastCheckResult = lastCheckResult; this.lastCheckResultTime = new Time(System.currentTimeMillis()); }
@Override public Time decodeTime() throws MALException { return new Time(sourceBuffer.getUnsignedLong()); }
@Override public Time decodeTime() throws MALException { return new Time(sourceBuffer.getUnsignedLong()); }
private void addToParameterValuesListAndRegister(Long paramIdentityId) throws MALException, MALInteractionException { //add to list of monitored parameterValues List<ParameterValueEntry> values = new ArrayList<ParameterValueEntry>(); //get the first Values values.add(new ParameterValueEntry(paramManager.getParameterValue(paramIdentityId), new Time(System.currentTimeMillis()))); parameterValues.put(paramIdentityId, values); //parameter will be registered at the adapter Subscription sub = subscriptionKeys(new Identifier("" + paramIdentityId), new Identifier("*"), paramIdentityId, 0L, 0L); parameterStub.monitorValueRegister(sub, adapter); }
public static Time fineTimeToTime(final FineTime fineTime) { return (fineTime == null) ? null : new Time(HelperTime.fromNanoToMilli(fineTime.getValue())); }
private static MALMessage createMessage(final MessageDetails details, final MALOperation op, final Long transactionId, final UOctet interactionStage, final Object... body) throws MALException { URI to = details.brokerUri; if (op.getInteractionType() != InteractionType.PUBSUB) { to = details.uriTo; } return details.endpoint.createMessage(details.authenticationId, to, new Time(new Date().getTime()), details.qosLevel, details.priority, details.domain, details.networkZone, details.sessionType, details.sessionName, transactionId, Boolean.FALSE, op, interactionStage, details.qosProps, body); }
private static MALMessage createMessage(final MessageDetails details, final MALOperation op, final Long transactionId, final UOctet interactionStage, final MALEncodedBody body) throws MALException { URI to = details.brokerUri; if (op.getInteractionType() != InteractionType.PUBSUB) { to = details.uriTo; } return details.endpoint.createMessage(details.authenticationId, to, new Time(new Date().getTime()), details.qosLevel, details.priority, details.domain, details.networkZone, details.sessionType, details.sessionName, transactionId, Boolean.FALSE, op, interactionStage, details.qosProps, body); } }
final Time time = new Time(System.currentTimeMillis()); final String timestamp = HelperTime.time2readableString(time);
return new Time();
final List<ParameterValueEntry> paramValues = parameterValues.get(paramIdentityId); ParameterValue oldParamValue = paramValues.get(paramValues.size() - 1).getValue(); paramValues.add(new ParameterValueEntry(newParamValue, new Time(System.currentTimeMillis())));
new Time(new Date().getTime()), lvl, srcHdr.getPriority(),
/** * saves the CheckResult of the check * * @param checkId identityId of the compoundCheck * @param checkResult the CheckResult-Object that should be stored. */ private void saveCheckResultObject(Long checkLinkId, CheckResult checkResult) { //save the new lastCheckResult as the current one final CheckLinkEvaluation checkLinkEvaluation = checkLinkEvalManager.get(checkLinkId); checkLinkEvaluation.setLastCheckResultTime(new Time(System.currentTimeMillis())); //get the current parameter-definition-id if available and set the object final ObjectId sourceParam = super.getCheckLinkLinks(checkLinkId).getSource(); checkResult.setParamDefInstId(sourceParam == null ? null : parameterManager.getDefinitionId(sourceParam.getKey().getInstId())); checkLinkEvaluation.setLastCheckResult(checkResult); }
new Time(new Date().getTime()), lvl, srcHdr.getPriority(),
previousSetTimeStamp = new Time(currentTime.getValue() - (long) (updateInterval.getValue() * 1000)); } else { //otherwise its the time of the last value of the previous set previousSetTimeStamp = new Time(this.latestSampleTimeList.get(identityId).get(indexParameterSet - 1).getValue()); Time firstSampleTime = new Time(this.latestSampleTimeList.get(identityId).get(indexParameterSet).getValue() - (long) (sampleInterval.getValue() * 1000) * sampleCountList.get(identityId).get(indexParameterSet));
Long now = (new Time()).getValue(); removeExpiredSamples(now, referenceValue, sampleTimes);
new Time(new Date().getTime()), level, srcHdr.getPriority(),
hdr.setTimestamp(new Time(new java.util.Date().getTime())); hdr.setInteractionType(InteractionType.PUBSUB); hdr.setInteractionStage(MALPubSubOperation.NOTIFY_STAGE);
static GENMessageHeader createReturnHeader(MALMessage sourceMessage, boolean isError, short stage) { GENMessageHeader hdr = new GENMessageHeader(); MALMessageHeader srcHdr = sourceMessage.getHeader(); hdr.setURIFrom(srcHdr.getURITo()); hdr.setURITo(srcHdr.getURIFrom()); hdr.setAuthenticationId(new Blob(JMSTransport.authId)); hdr.setTimestamp(new Time(new java.util.Date().getTime())); hdr.setQoSlevel(srcHdr.getQoSlevel()); hdr.setPriority(srcHdr.getPriority()); hdr.setDomain(srcHdr.getDomain()); hdr.setNetworkZone(srcHdr.getNetworkZone()); hdr.setSession(srcHdr.getSession()); hdr.setSessionName(srcHdr.getSessionName()); hdr.setInteractionType(srcHdr.getInteractionType()); hdr.setInteractionStage(new UOctet(stage)); hdr.setTransactionId(srcHdr.getTransactionId()); hdr.setServiceArea(srcHdr.getServiceArea()); hdr.setService(srcHdr.getService()); hdr.setOperation(srcHdr.getOperation()); hdr.setAreaVersion(srcHdr.getAreaVersion()); hdr.setIsErrorMessage(isError); return hdr; }
evaluationResult.setEvaluationTime(new Time(System.currentTimeMillis()));