Package com.basho.riak.client.core

Examples of com.basho.riak.client.core.RiakMessage


    }
   
    @Override
    public void channelRead(ChannelHandlerContext chc, Object message) throws Exception
    {
        RiakMessage riakMessage = (RiakMessage) message;
        if (riakMessage.getCode() == RiakMessageCodes.MSG_ErrorResp)
        {
            RiakPB.RpbErrorResp error = RiakPB.RpbErrorResp.parseFrom(riakMessage.getData());
                                               
            listener.onRiakErrorResponse(chc.channel(),
                                         new RiakResponseException(error.getErrcode(),
                                             error.getErrmsg().toStringUtf8()));
        }
View Full Code Here


    private void init(ChannelHandlerContext ctx)
    {
        state = State.TLS_WAIT;
        promise = new DefaultPromise<Void>(ctx.executor());
        promiseLatch.countDown();
        ctx.channel().writeAndFlush(new RiakMessage(RiakMessageCodes.MSG_StartTls,
                                    new byte[0]));
       
    }
View Full Code Here

                RiakPB.RpbAuthReq authReq =
                RiakPB.RpbAuthReq.newBuilder()
                    .setUser(ByteString.copyFromUtf8(username))
                    .setPassword(ByteString.copyFromUtf8(password))
                    .build();
                c.writeAndFlush(new RiakMessage(RiakMessageCodes.MSG_AuthReq,
                                authReq.toByteArray()));
               
            }
            else
            {
View Full Code Here

            else
            {
                byte code = in.readByte();
                byte[] array = new byte[length - 1];
                in.readBytes(array);
                out.add(new RiakMessage(code,array));
            }
           
        }
    }
View Full Code Here

                    promise.tryFailure((riakErrorToException(protobuf)));
                }
                else
                {
                    logger.debug("Healthcheck op successful; returned code {}", code);
                    promise.trySuccess(new RiakMessage(code,protobuf));
                }
            }
        }
    }
View Full Code Here

    }

    @Override
    protected RiakMessage createChannelMessage()
    {
        return new RiakMessage(RiakMessageCodes.MSG_ListBucketsReq, reqBuilder.build().toByteArray());
    }
View Full Code Here

    @Override
    protected RiakMessage createChannelMessage()
    {
        RiakPB.RpbGetBucketReq req = reqBuilder.build();
        return new RiakMessage(RiakMessageCodes.MSG_GetBucketReq, req.toByteArray());
    }
View Full Code Here

    @Override
    protected RiakMessage createChannelMessage()
    {
        RiakYokozunaPB.RpbYokozunaIndexDeleteReq req = reqBuilder.build();
        return new RiakMessage(RiakMessageCodes.MSG_YokozunaIndexDeleteReq, req.toByteArray());
       
    }
View Full Code Here

    @Override
    protected RiakMessage createChannelMessage()
    {
        RiakPB.RpbSetBucketReq req = reqBuilder.build();
        return new RiakMessage(RiakMessageCodes.MSG_SetBucketReq, req.toByteArray());
    }
View Full Code Here

    @Override
    protected RiakMessage createChannelMessage()
    {
        RiakKvPB.RpbMapRedReq request = reqBuilder.build();
        return new RiakMessage(RiakMessageCodes.MSG_MapRedReq, request.toByteArray());
    }
View Full Code Here

TOP

Related Classes of com.basho.riak.client.core.RiakMessage

Copyright © 2018 www.massapicom. 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.