private byte[] toBytes() {
        ByteBuffer buf = ByteBuffer.allocate(4 + (m_tokenCount * 8));
        buf.putInt(m_tokenCount);
        int lastToken = Integer.MIN_VALUE;
        for (int ii = 0; ii < m_tokenCount; ii++) {
            final long ptr = m_tokens + (ii * 8);
            final int token = Bits.unsafe.getInt(ptr);
            Preconditions.checkArgument(token >= lastToken);
            lastToken = token;
            final int pid = Bits.unsafe.getInt(ptr + 4);
            buf.putInt(token);
            buf.putInt(pid);
        }
        return buf.array();
    }
private byte [ ] toBytes ( ) { ByteBuffer buf = ByteBuffer . allocate ( 4 + ( m_tokenCount * 8 ) ) ; buf . putInt ( m_tokenCount ) ; int lastToken = Integer . MIN_VALUE ; for ( int ii = 0 ; ii < m_tokenCount ; ii ++ ) { final long ptr = m_tokens + ( ii * 8 ) ; final int token = Bits . unsafe . getInt ( ptr ) ; Preconditions . checkArgument ( token >= lastToken ) ; lastToken = token ; final int pid = Bits . unsafe . getInt ( ptr + 4 ) ; buf . putInt ( token ) ; buf . putInt ( pid ) ; } return buf . array ( ) ; }
Serializes the configuration into bytes, also updates the currently cached m_configBytes.
@return The byte[] of the current configuration.