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


Java ObjectDataOutput.writeLong方法代码示例

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


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

示例1: writeData

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
	out.writeUTF(clientId);
	out.writeUTF(ip);
	out.writeInt(port);
	out.writeBoolean(isConnected);
	out.writeInt(currentMessageId);

	out.writeBoolean(will != null);
	if (will != null) {
		will.writeData(out);
	}

	out.writeBoolean(cleanSession);
	out.writeInt(keepAliveSeconds);
	out.writeLong(createTime != null ? createTime.getTime() : Long.MIN_VALUE);
	out.writeLong(lastIncomingTime != null ? lastIncomingTime.getTime() : Long.MIN_VALUE);
}
 
开发者ID:anyflow,项目名称:lannister,代码行数:19,代码来源:Session.java

示例2: createSerializer

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public Serializer createSerializer() {
    return new StreamSerializer<LongLongAccumulator>() {
        @Override
        public int getTypeId() {
            return SerializerHookConstants.LONG_LONG_ACC;
        }

        @Override
        public void destroy() {
        }

        @Override
        public void write(ObjectDataOutput out, LongLongAccumulator object) throws IOException {
            out.writeLong(object.getValue1());
            out.writeLong(object.getValue2());
        }

        @Override
        public LongLongAccumulator read(ObjectDataInput in) throws IOException {
            return new LongLongAccumulator(in.readLong(), in.readLong());
        }
    };
}
 
开发者ID:hazelcast,项目名称:hazelcast-jet,代码行数:25,代码来源:AccumulatorSerializerHooks.java

示例3: createSerializer

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public Serializer createSerializer() {
    return new StreamSerializer<BroadcastKeyReference>() {
        @Override
        public int getTypeId() {
            return SerializerHookConstants.BROADCAST_KEY_REFERENCE;
        }

        @Override
        public void destroy() {

        }

        @Override
        public void write(ObjectDataOutput out, BroadcastKeyReference object) throws IOException {
            out.writeLong(object.id());
            out.writeObject(object.key());
        }

        @Override
        public BroadcastKeyReference read(ObjectDataInput in) throws IOException {
            return new BroadcastKeyReference(in.readLong(), in.readObject());
        }
    };
}
 
开发者ID:hazelcast,项目名称:hazelcast-jet,代码行数:26,代码来源:ExecutionSerializerHooks.java

示例4: writeData

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
	out.writeUTF(address);
	out.writeInt(partId);
	out.writeInt(docCount);
	out.writeLong(docCost);
	out.writeInt(docInQueue);
	out.writeInt(docActive);
	out.writeLong(conCost);
	out.writeInt(eltCount);
	out.writeLong(eltCost);
	out.writeInt(idxCount);
	out.writeLong(idxCost);
	out.writeInt(resCount);
	out.writeLong(resCost);
}
 
开发者ID:dsukhoroslov,项目名称:bagri,代码行数:17,代码来源:PartitionStatistics.java

示例5: writeData

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
    out.writeDouble(totalPrice);
    out.writeLong(date.getTime());
    out.writeLong(id);
    out.writeInt(items.size());
    items.forEach(item -> {
        try{
            item.writeData(out);
        } catch (IOException ex) {
            ex.printStackTrace();
        }
    });
}
 
开发者ID:ivogm,项目名称:bookstore,代码行数:15,代码来源:ShoppingCart.java

示例6: writeData

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
	out.writeUTF(messageKey);
	out.writeUTF(clientId);
	out.writeInt(messageId);
	out.writeUTF(topicName);
	out.writeLong(createTime != null ? createTime.getTime() : Long.MIN_VALUE);
	out.writeLong(updateTime != null ? updateTime.getTime() : Long.MIN_VALUE);
}
 
开发者ID:anyflow,项目名称:lannister,代码行数:10,代码来源:MessageStatus.java

示例7: writeData

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public final void writeData(ObjectDataOutput out) throws IOException {
  out.writeUTF(getCorrelationId());
  out.writeLong(getGenTimestamp());
  out.writeUTF(getHeader());
  out.writeByteArray(bytes);
}
 
开发者ID:javanotes,项目名称:reactive-data,代码行数:8,代码来源:Event.java

示例8: writeData

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
  out.writeUTF(getFileName());
  out.writeLong(getFileSize());
  out.writeLong(getCreationTime());
  out.writeLong(getLastAccessTime());
  out.writeLong(getLastModifiedTime());
  out.writeInt(getSize());
  out.writeInt(getOffset());
  out.writeByteArray(getChunk());

}
 
开发者ID:javanotes,项目名称:reactive-data,代码行数:13,代码来源:FileChunk.java

示例9: writeData

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(final ObjectDataOutput out) throws IOException {
    super.writeData(out);
    out.writeBoolean(concurrent);
    out.writeUTF(markerId);
    out.writeInt(multiplicity);
    out.writeLong(timeout);
    out.writeLong(expiredTimestamp);
}
 
开发者ID:hazelcast,项目名称:hazelcast-hibernate5,代码行数:10,代码来源:ExpiryMarker.java

示例10: writeData

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(final ObjectDataOutput out) throws IOException {
    out.writeObject(lock);
    out.writeObject(newValue);
    out.writeObject(newVersion);
    out.writeUTF(nextMarkerId);
    out.writeLong(timestamp);
}
 
开发者ID:hazelcast,项目名称:hazelcast-hibernate5,代码行数:9,代码来源:UpdateEntryProcessor.java

示例11: writeData

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException
{
    out.writeLong(id);
    out.writeUTF(topic);
    out.writeUTF(type);
    out.writeLong(timestamp);
    out.writeByteArray(payload);
    doWriteData(out);
}
 
开发者ID:ethlo,项目名称:kfka,代码行数:11,代码来源:KfkaMessage.java

示例12: writeData

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
    super.writeData(out);
    out.writeBoolean(concurrent);
    out.writeUTF(markerId);
    out.writeInt(multiplicity);
    out.writeLong(timeout);
    out.writeLong(expiredTimestamp);
}
 
开发者ID:hazelcast,项目名称:hazelcast-hibernate,代码行数:10,代码来源:ExpiryMarker.java

示例13: writeData

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
    out.writeObject(lock);
    out.writeObject(newValue);
    out.writeObject(newVersion);
    out.writeUTF(nextMarkerId);
    out.writeLong(timestamp);
}
 
开发者ID:hazelcast,项目名称:hazelcast-hibernate,代码行数:9,代码来源:UpdateEntryProcessor.java

示例14: writeData

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput objectDataOutput) throws IOException {
    objectDataOutput.writeLong(creationTime);
    objectDataOutput.writeLong(lastAccessedTime);
    objectDataOutput.writeInt(maxInactiveInterval);
    objectDataOutput.writeBoolean(isNew);
    objectDataOutput.writeBoolean(isValid);
    objectDataOutput.writeLong(thisAccessedTime);
    objectDataOutput.writeObject(id);

    serializeMap(getAttributes(), objectDataOutput);
    serializeMap(notes, objectDataOutput);
}
 
开发者ID:hazelcast,项目名称:hazelcast-tomcat-sessionmanager,代码行数:14,代码来源:HazelcastSession.java

示例15: writeData

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
    out.writeLong(this.getCount());
    out.writeDouble(this.getSum());
    out.writeDouble(this.getMin());
    out.writeDouble(this.getMax());
}
 
开发者ID:hazelcast,项目名称:hazelcast-jet,代码行数:8,代码来源:DistributedDoubleSummaryStatistics.java


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