analysis.io: Make the main package internal for now
[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
6d02c5c1
HD
16 */
17public enum IoOperationType {
18
19 /**
20 * Write to the disk
21 */
22 WRITE,
23 /**
24 * Read on the disk
25 */
26 READ;
27
28 /**
29 * Get the BIO type from the rwbs value of a block operation.
30 *
31 * @param rwbs
32 * The rwbs value of the block operation
33 * @return The BIO type
34 */
35 public static IoOperationType getType(int rwbs) {
36 /* Even is a "read", odd is a "write" */
37 return (rwbs % 2 == 0) ? READ : WRITE;
38 }
39}
This page took 0.027884 seconds and 5 git commands to generate.