8fc7d6d55bbcf6feb9343cd83301a34fc097ebba
[controller.git] / opendaylight / md-sal / sal-clustering-commons / src / main / java / org / opendaylight / controller / cluster / datastore / node / utils / stream / TokenTypes.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.cluster.datastore.node.utils.stream;
9
10 final class TokenTypes {
11     private TokenTypes() {
12         throw new UnsupportedOperationException();
13     }
14
15     static final byte SIGNATURE_MARKER = (byte) 0xab;
16
17     /**
18      * Original stream version. Uses a per-stream dictionary for strings. QNames are serialized as three strings.
19      */
20     static final short LITHIUM_VERSION = 1;
21     /**
22      * Revised stream version. Unlike {@link #LITHIUM_VERSION}, QNames and QNameModules are using a per-stream
23      * dictionary, too.
24      */
25     static final short NEON_SR2_VERSION = 2;
26
27     // Tokens supported in NEON_SR2_VERSION
28     static final byte IS_QNAME_CODE = 4;
29     static final byte IS_QNAME_VALUE = 5;
30     static final byte IS_AUGMENT_CODE = 6;
31     static final byte IS_AUGMENT_VALUE = 7;
32     static final byte IS_MODULE_CODE = 8;
33     static final byte IS_MODULE_VALUE = 9;
34 }