analysis.io: Introduce the input/output linux analysis
[deliverable/tracecompass.git] / analysis / org.eclipse.tracecompass.analysis.os.linux.core / src / org / eclipse / tracecompass / analysis / os / linux / core / inputoutput / IoOperationType.java
CommitLineData
6d02c5c1
HD
1/*******************************************************************************
2 * Copyright (c) 2016 École Polytechnique de Montréal
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *******************************************************************************/
9
10package org.eclipse.tracecompass.analysis.os.linux.core.inputoutput;
11
12/**
13 * Enum type for IO operations
14 *
15 * @author Geneviève Bastien
16 * @since 2.0
17 */
18public enum IoOperationType {
19
20 /**
21 * Write to the disk
22 */
23 WRITE,
24 /**
25 * Read on the disk
26 */
27 READ;
28
29 /**
30 * Get the BIO type from the rwbs value of a block operation.
31 *
32 * @param rwbs
33 * The rwbs value of the block operation
34 * @return The BIO type
35 */
36 public static IoOperationType getType(int rwbs) {
37 /* Even is a "read", odd is a "write" */
38 return (rwbs % 2 == 0) ? READ : WRITE;
39 }
40}
This page took 0.026162 seconds and 5 git commands to generate.