Package org.apache.cassandra.io

Examples of org.apache.cassandra.io.DataInputBuffer.reset()


        byte[] body = (byte[])message.getMessageBody()[0];
       
        try
        {
            DataInputBuffer bufIn = new DataInputBuffer();
            bufIn.reset(body, body.length);
            /* Deserialize to get the token for this endpoint. */
            MembershipCleaner.MembershipCleanerMessage mcMessage = MembershipCleaner.MembershipCleanerMessage.serializer().deserialize(bufIn);
           
            String target = mcMessage.getTarget();
            logger_.info("Removing the node [" + target + "] from membership");
View Full Code Here


        f.add("a");
        DataOutputBuffer out = new DataOutputBuffer();
        f.getSerializer().serialize(f, out);

        DataInputBuffer in = new DataInputBuffer();
        in.reset(out.getData(), out.getLength());
        Filter f2 = f.getSerializer().deserialize(in);

        assert f2.isPresent("a");
        assert !f2.isPresent("b");
        return f2;
View Full Code Here

            catch (TimeoutException e)
            {
                throw new TimedOutException();
            }
            DataInputBuffer bufIn = new DataInputBuffer();
            bufIn.reset(body, body.length);
            ReadResponse response = ReadResponse.serializer().deserialize(bufIn);
            if (response.row() != null)
                rows.add(response.row());
        }
        return rows;
View Full Code Here

        //test the serialization and equals
        DataOutputBuffer output = new DataOutputBuffer();
        GossipDigest.serializer().serialize(expected, output);
       
        DataInputBuffer input = new DataInputBuffer();
        input.reset(output.getData(), output.getLength());
        GossipDigest actual = GossipDigest.serializer().deserialize(input);
        assertEquals(0, expected.compareTo(actual));
    }

}
View Full Code Here

        */
        DataInputBuffer bufIn = new DataInputBuffer();
    for (Message response : responses)
    {                     
            byte[] body = response.getMessageBody();
            bufIn.reset(body, body.length);
            ReadResponse result = ReadResponse.serializer().deserialize(bufIn);
            if (result.isDigestQuery())
            {
                digest = result.digest();
                isDigestQuery = true;
View Full Code Here

        boolean isDataPresent = false;
        for (Message response : responses)
        {
            byte[] body = response.getMessageBody();
            DataInputBuffer bufIn = new DataInputBuffer();
            bufIn.reset(body, body.length);
            try
            {
                ReadResponse result = ReadResponse.serializer().deserialize(bufIn);
                if (!result.isDigestQuery())
                {
View Full Code Here

    public static RangeSliceCommand read(Message message) throws IOException
    {
        byte[] bytes = message.getMessageBody();
        DataInputBuffer dib = new DataInputBuffer();
        dib.reset(bytes, bytes.length);
        return serializer.deserialize(new DataInputStream(dib));
    }
}

class SliceCommandSerializer implements ICompactSerializer<RangeSliceCommand>
View Full Code Here

         */
        public void doVerb(Message message)
        {
            byte[] bytes = message.getMessageBody();
            DataInputBuffer buffer = new DataInputBuffer();
            buffer.reset(bytes, bytes.length);

            try
            {
                CFPair request = this.deserialize(buffer);

View Full Code Here

        public void doVerb(Message message)
        {
            byte[] bytes = message.getMessageBody();
            DataInputBuffer buffer = new DataInputBuffer();
            buffer.reset(bytes, bytes.length);

            try
            {
                // deserialize the remote tree, and register it
                Validator rvalidator = this.deserialize(buffer);
View Full Code Here

    public void doVerb(Message message)
    {
        byte[] bytes = message.getMessageBody();
        DataInputBuffer buffer = new DataInputBuffer();
        buffer.reset(bytes, bytes.length);

      try
      {
            RowMutationMessage rmMsg = RowMutationMessage.serializer().deserialize(buffer);
            RowMutation rm = rmMsg.getRowMutation();                             
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.