/*******************************************************************************
- * Copyright (c) 2009, 2013 Ericsson
+ * Copyright (c) 2009, 2015 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* TODO: Implement request failures (codes, etc...)
*
* @author Francois Chouinard
- * @since 3.0
*/
public abstract class TmfEventRequest implements ITmfEventRequest {
/** The requested events time range */
private final TmfTimeRange fRange;
- /** The index (rank) of the requested event
- * @since 3.0*/
+ /** The index (rank) of the requested event */
protected long fIndex;
- /** The number of requested events (ALL_DATA for all)
- * @since 3.0*/
+ /** The number of requested events (ALL_DATA for all) */
protected int fNbRequested;
/** The number of reads so far */
}
}
- /**
- * Resets the request counter (used for testing)
- */
- public static synchronized void reset() {
- fRequestNumber = 0;
- }
-
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
return fIndex;
}
- /**
- * @since 3.0
- */
@Override
public ExecutionType getExecType() {
return fExecType;
// Object
// ------------------------------------------------------------------------
- @Override
- // All requests have a unique id
- public int hashCode() {
- return getRequestId();
- }
-
- @Override
- public boolean equals(Object other) {
- if (other instanceof TmfEventRequest) {
- TmfEventRequest request = (TmfEventRequest) other;
- return request.fDataType == fDataType
- && request.fIndex == fIndex
- && request.fNbRequested == fNbRequested
- && request.fRange.equals(fRange);
- }
- return false;
- }
-
@Override
public String toString() {
String name = getClass().getName();