Class UserData


  • final class UserData
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private UserData()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static short decodeData​(long udata)  
      (package private) static int decodeId​(long udata)  
      (package private) static byte decodeOp​(long udata)  
      (package private) static long encode​(int id, byte op, short data)
      Encode the given data into a long that can be stored as udata.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UserData

        private UserData()
    • Method Detail

      • encode

        static long encode​(int id,
                           byte op,
                           short data)
        Encode the given data into a long that can be stored as udata. layout 63 32 31 24 23 16 15 0 [ id ][ unused ][ op ][ data ]
        Parameters:
        id - the id.
        op - the operation
        data - the custom data
        Returns:
        the udata.
      • decodeId

        static int decodeId​(long udata)
      • decodeOp

        static byte decodeOp​(long udata)
      • decodeData

        static short decodeData​(long udata)