当前位置: 首页>>代码示例>>Java>>正文


Java CompactEndpointSerializationHelper.serialize方法代码示例

本文整理汇总了Java中org.apache.cassandra.net.CompactEndpointSerializationHelper.serialize方法的典型用法代码示例。如果您正苦于以下问题:Java CompactEndpointSerializationHelper.serialize方法的具体用法?Java CompactEndpointSerializationHelper.serialize怎么用?Java CompactEndpointSerializationHelper.serialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.cassandra.net.CompactEndpointSerializationHelper的用法示例。


在下文中一共展示了CompactEndpointSerializationHelper.serialize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: serialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入方法依赖的package包/类
public void serialize(GossipDigestAck2 ack2, DataOutputPlus out, int version) throws IOException
{
    out.writeInt(ack2.epStateMap.size());
    for (Map.Entry<InetAddress, EndpointState> entry : ack2.epStateMap.entrySet())
    {
        InetAddress ep = entry.getKey();
        CompactEndpointSerializationHelper.serialize(ep, out);
        EndpointState.serializer.serialize(entry.getValue(), out, version);
    }
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:11,代码来源:GossipDigestAck2.java

示例2: serialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入方法依赖的package包/类
public void serialize(GossipDigestAck gDigestAckMessage, DataOutputPlus out, int version) throws IOException
{
    GossipDigestSerializationHelper.serialize(gDigestAckMessage.gDigestList, out, version);
    out.writeInt(gDigestAckMessage.epStateMap.size());
    for (Map.Entry<InetAddress, EndpointState> entry : gDigestAckMessage.epStateMap.entrySet())
    {
        InetAddress ep = entry.getKey();
        CompactEndpointSerializationHelper.serialize(ep, out);
        EndpointState.serializer.serialize(entry.getValue(), out, version);
    }
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:12,代码来源:GossipDigestAck.java

示例3: serialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入方法依赖的package包/类
public void serialize(SyncRequest message, DataOutputPlus out, int version) throws IOException
{
    RepairJobDesc.serializer.serialize(message.desc, out, version);
    CompactEndpointSerializationHelper.serialize(message.initiator, out);
    CompactEndpointSerializationHelper.serialize(message.src, out);
    CompactEndpointSerializationHelper.serialize(message.dst, out);
    out.writeInt(message.ranges.size());
    for (Range<Token> range : message.ranges)
        AbstractBounds.serializer.serialize(range, out, version);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:11,代码来源:SyncRequest.java

示例4: serialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入方法依赖的package包/类
public void serialize(StreamInitMessage message, DataOutputPlus out, int version) throws IOException
{
    CompactEndpointSerializationHelper.serialize(message.from, out);
    out.writeInt(message.sessionIndex);
    UUIDSerializer.serializer.serialize(message.planId, out, MessagingService.current_version);
    out.writeUTF(message.description);
    out.writeBoolean(message.isForOutgoing);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:9,代码来源:StreamInitMessage.java

示例5: serialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入方法依赖的package包/类
public void serialize(GossipDigestAck2 ack2, DataOutput out, int version) throws IOException
{
    out.writeInt(ack2.epStateMap.size());
    for (Map.Entry<InetAddress, EndpointState> entry : ack2.epStateMap.entrySet())
    {
        InetAddress ep = entry.getKey();
        CompactEndpointSerializationHelper.serialize(ep, out);
        EndpointState.serializer.serialize(entry.getValue(), out, version);
    }
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:11,代码来源:GossipDigestAck2.java

示例6: serialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入方法依赖的package包/类
public void serialize(GossipDigestAck gDigestAckMessage, DataOutput out, int version) throws IOException
{
    GossipDigestSerializationHelper.serialize(gDigestAckMessage.gDigestList, out, version);
    out.writeInt(gDigestAckMessage.epStateMap.size());
    for (Map.Entry<InetAddress, EndpointState> entry : gDigestAckMessage.epStateMap.entrySet())
    {
        InetAddress ep = entry.getKey();
        CompactEndpointSerializationHelper.serialize(ep, out);
        EndpointState.serializer.serialize(entry.getValue(), out, version);
    }
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:12,代码来源:GossipDigestAck.java

示例7: serialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入方法依赖的package包/类
public void serialize(SyncRequest message, DataOutput out, int version) throws IOException
{
    RepairJobDesc.serializer.serialize(message.desc, out, version);
    CompactEndpointSerializationHelper.serialize(message.initiator, out);
    CompactEndpointSerializationHelper.serialize(message.src, out);
    CompactEndpointSerializationHelper.serialize(message.dst, out);
    out.writeInt(message.ranges.size());
    for (Range<Token> range : message.ranges)
        AbstractBounds.serializer.serialize(range, out, version);
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:11,代码来源:SyncRequest.java

示例8: serialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入方法依赖的package包/类
public void serialize(StreamInitMessage message, DataOutput out, int version) throws IOException
{
    CompactEndpointSerializationHelper.serialize(message.from, out);
    UUIDSerializer.serializer.serialize(message.planId, out, MessagingService.current_version);
    out.writeUTF(message.description);
    out.writeBoolean(message.isForOutgoing);
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:8,代码来源:StreamInitMessage.java

示例9: serialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入方法依赖的package包/类
public void serialize(SyncRequest message, DataOutputPlus out, int version) throws IOException
{
    RepairJobDesc.serializer.serialize(message.desc, out, version);
    CompactEndpointSerializationHelper.serialize(message.initiator, out);
    CompactEndpointSerializationHelper.serialize(message.src, out);
    CompactEndpointSerializationHelper.serialize(message.dst, out);
    out.writeInt(message.ranges.size());
    for (Range<Token> range : message.ranges)
    {
        MessagingService.validatePartitioner(range);
        AbstractBounds.tokenSerializer.serialize(range, out, version);
    }
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:14,代码来源:SyncRequest.java

示例10: serialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入方法依赖的package包/类
public void serialize(StreamInitMessage message, DataOutputPlus out, int version) throws IOException
{
    CompactEndpointSerializationHelper.serialize(message.from, out);
    out.writeInt(message.sessionIndex);
    UUIDSerializer.serializer.serialize(message.planId, out, MessagingService.current_version);
    out.writeUTF(message.description);
    out.writeBoolean(message.isForOutgoing);
    out.writeBoolean(message.keepSSTableLevel);
    out.writeBoolean(message.isIncremental);
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:11,代码来源:StreamInitMessage.java

示例11: serialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入方法依赖的package包/类
public void serialize(GossipDigestAck2 ack2, DataOutput dos, int version) throws IOException
{
    dos.writeInt(ack2.epStateMap.size());
    for (Map.Entry<InetAddress, EndpointState> entry : ack2.epStateMap.entrySet())
    {
        InetAddress ep = entry.getKey();
        CompactEndpointSerializationHelper.serialize(ep, dos);
        EndpointState.serializer.serialize(entry.getValue(), dos, version);
    }
}
 
开发者ID:jackliu8722,项目名称:cassandra-1.2.16,代码行数:11,代码来源:GossipDigestAck2.java

示例12: serialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入方法依赖的package包/类
public void serialize(StreamingRepairTask task, DataOutput dos, int version) throws IOException
{
    UUIDSerializer.serializer.serialize(task.id, dos, version);
    CompactEndpointSerializationHelper.serialize(task.owner, dos);
    CompactEndpointSerializationHelper.serialize(task.src, dos);
    CompactEndpointSerializationHelper.serialize(task.dst, dos);
    dos.writeUTF(task.tableName);
    dos.writeUTF(task.cfName);
    dos.writeInt(task.ranges.size());
    for (Range<Token> range : task.ranges)
        AbstractBounds.serializer.serialize(range, dos, version);
    // We don't serialize the callback on purpose
}
 
开发者ID:jackliu8722,项目名称:cassandra-1.2.16,代码行数:14,代码来源:StreamingRepairTask.java

示例13: serialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入方法依赖的package包/类
public void serialize(GossipDigestAck gDigestAckMessage, DataOutput dos, int version) throws IOException
{
    GossipDigestSerializationHelper.serialize(gDigestAckMessage.gDigestList, dos, version);
    if (version < MessagingService.VERSION_12)
        dos.writeBoolean(true); // 0.6 compatibility
    dos.writeInt(gDigestAckMessage.epStateMap.size());
    for (Map.Entry<InetAddress, EndpointState> entry : gDigestAckMessage.epStateMap.entrySet())
    {
        InetAddress ep = entry.getKey();
        CompactEndpointSerializationHelper.serialize(ep, dos);
        EndpointState.serializer.serialize(entry.getValue(), dos, version);
    }
}
 
开发者ID:jackliu8722,项目名称:cassandra-1.2.16,代码行数:14,代码来源:GossipDigestAck.java

示例14: serialize

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入方法依赖的package包/类
public void serialize(StreamInitMessage message, DataOutputPlus out, int version) throws IOException
{
    CompactEndpointSerializationHelper.serialize(message.from, out);
    UUIDSerializer.serializer.serialize(message.planId, out, MessagingService.current_version);
    out.writeUTF(message.description);
    out.writeBoolean(message.isForOutgoing);
}
 
开发者ID:rajath26,项目名称:cassandra-trunk,代码行数:8,代码来源:StreamInitMessage.java

示例15: connect

import org.apache.cassandra.net.CompactEndpointSerializationHelper; //导入方法依赖的package包/类
public boolean connect() {
    long start = System.nanoTime();
    long timeout = TimeUnit.MILLISECONDS.toNanos(DatabaseDescriptor.getRpcTimeout());
    while (System.nanoTime() - start < timeout) {
        targetVersion = 10;
        try {
            SocketChannel channel = SocketChannel.open();
            channel.connect(new InetSocketAddress(host, DatabaseDescriptor.getStoragePort()));
            socket = channel.socket();
            socket.setTcpNoDelay(true);
            if (DatabaseDescriptor.getInternodeSendBufferSize() != 0) {
                try {
                    socket.setSendBufferSize(DatabaseDescriptor.getInternodeSendBufferSize());
                } catch (SocketException se) {
                    System.err.println("Failed to set send buffer size on internode socket." + se);
                }
            }

            // SocketChannel may be null when using SSL
            WritableByteChannel ch = socket.getChannel();
            out = new BufferedDataOutputStreamPlus(ch != null ? ch : Channels.newChannel(socket.getOutputStream()), BUFFER_SIZE);

            out.writeInt(MessagingService.PROTOCOL_MAGIC);
            writeHeader(out, targetVersion, false);
            out.flush();

            DataInputStream in = new DataInputStream(socket.getInputStream());
            int maxTargetVersion = in.readInt();
            MessagingService.instance().setVersion(host, maxTargetVersion);

            out.writeInt(MessagingService.current_version);
            CompactEndpointSerializationHelper.serialize(FBUtilities.getBroadcastAddress(), out);
            out.flush();
            return true;
        } catch (IOException e) {
            socket = null;
            e.printStackTrace();
            System.err.println("unable to connect to " + host + e);
            Uninterruptibles.sleepUninterruptibly(OPEN_RETRY_DELAY, TimeUnit.MILLISECONDS);
        }
    }
    return false;
}
 
开发者ID:tolbertam,项目名称:sstable-tools,代码行数:44,代码来源:StorageConnection.java


注:本文中的org.apache.cassandra.net.CompactEndpointSerializationHelper.serialize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。