本文整理汇总了Java中com.hazelcast.nio.ObjectDataInput.readLong方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectDataInput.readLong方法的具体用法?Java ObjectDataInput.readLong怎么用?Java ObjectDataInput.readLong使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.hazelcast.nio.ObjectDataInput
的用法示例。
在下文中一共展示了ObjectDataInput.readLong方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readData
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput in) throws IOException {
clientId = in.readUTF();
ip = in.readUTF();
port = in.readInt();
isConnected = in.readBoolean();
currentMessageId = in.readInt();
if (in.readBoolean()) {
will = new Message(in);
}
cleanSession = in.readBoolean();
keepAliveSeconds = in.readInt();
long rawLong = in.readLong();
createTime = rawLong != Long.MIN_VALUE ? new Date(rawLong) : null;
rawLong = in.readLong();
lastIncomingTime = rawLong != Long.MIN_VALUE ? new Date(rawLong) : null;
disposeLock = ClusterDataFactory.INSTANCE.createLock("Session_disposeLock_" + clientId);
messageSender = new MessageSender(this);
}
示例2: readData
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput objectDataInput) throws IOException {
this.creationTime = objectDataInput.readLong();
this.lastAccessedTime = objectDataInput.readLong();
this.maxInactiveInterval = objectDataInput.readInt();
this.isNew = objectDataInput.readBoolean();
this.isValid = objectDataInput.readBoolean();
this.thisAccessedTime = objectDataInput.readLong();
this.id = objectDataInput.readObject();
setAttributes(deserializeMap(objectDataInput, true));
this.notes = deserializeMap(objectDataInput, false);
if (this.listeners == null) {
this.listeners = new ArrayList();
}
}
示例3: createSerializer
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public Serializer createSerializer() {
return new StreamSerializer<Watermark>() {
@Override
public int getTypeId() {
return SerializerHookConstants.WATERMARK;
}
@Override
public void destroy() {
}
@Override
public void write(ObjectDataOutput out, Watermark object) throws IOException {
out.writeLong(object.timestamp());
}
@Override
public Watermark read(ObjectDataInput in) throws IOException {
return new Watermark(in.readLong());
}
};
}
示例4: createSerializer
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public Serializer createSerializer() {
return new StreamSerializer<LongAccumulator>() {
@Override
public int getTypeId() {
return SerializerHookConstants.LONG_ACC;
}
@Override
public void destroy() {
}
@Override
public void write(ObjectDataOutput out, LongAccumulator object) throws IOException {
out.writeLong(object.get());
}
@Override
public LongAccumulator read(ObjectDataInput in) throws IOException {
return new LongAccumulator(in.readLong());
}
};
}
示例5: readInternal
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
protected void readInternal(ObjectDataInput in) throws IOException {
super.readInternal(in);
jobId = in.readLong();
executionId = in.readLong();
coordinatorMemberListVersion = in.readInt();
int count = in.readInt();
participants = new HashSet<>();
for (int i = 0; i < count; i++) {
MemberInfo participant = new MemberInfo();
participant.readData(in);
participants.add(participant);
}
final Data planBlob = in.readData();
planSupplier = () -> {
JetService service = getService();
ClassLoader cl = service.getClassLoader(jobId);
return deserializeWithCustomClassLoader(getNodeEngine().getSerializationService(), cl, planBlob);
};
}
示例6: readData
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput in) throws IOException {
size = in.readInt();
if (size > starts.length) {
// round to next power of 2
@SuppressWarnings("checkstyle:magicnumber")
int newSize = 1 << (32 - Integer.numberOfLeadingZeros(size - 1));
starts = new long[newSize];
ends = new long[newSize];
accs = (A[]) new Object[newSize];
}
for (int i = 0; i < size; i++) {
starts[i] = in.readLong();
ends[i] = in.readLong();
accs[i] = in.readObject();
}
}
示例7: createSerializer
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public Serializer createSerializer() {
return new StreamSerializer<SnapshotBarrier>() {
@Override
public int getTypeId() {
return SerializerHookConstants.SNAPSHOT_BARRIER;
}
@Override
public void destroy() {
}
@Override
public void write(ObjectDataOutput out, SnapshotBarrier object) throws IOException {
out.writeLong(object.snapshotId());
}
@Override
public SnapshotBarrier read(ObjectDataInput in) throws IOException {
return new SnapshotBarrier(in.readLong());
}
};
}
示例8: readData
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput in) throws IOException {
address = in.readUTF();
partId = in.readInt();
docCount = in.readInt();
docCost = in.readLong();
docInQueue = in.readInt();
docActive = in.readInt();
conCost = in.readLong();
eltCount = in.readInt();
eltCost = in.readLong();
idxCount = in.readInt();
idxCost = in.readLong();
resCount = in.readInt();
resCost = in.readLong();
}
示例9: read
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public Document read(ObjectDataInput in) throws IOException {
FragmentedDocument xDoc = new FragmentedDocument(
in.readLong(),
in.readUTF(),
in.readUTF(),
in.readLong(),
in.readLong(),
new java.util.Date(in.readLong()),
in.readUTF(),
in.readUTF(),
in.readInt(),
in.readInt());
xDoc.setCollections(in.readIntArray());
xDoc.setFragments(in.readLongArray());
return xDoc;
}
示例10: readInternal
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
protected void readInternal(ObjectDataInput in)
throws IOException {
super.readInternal(in);
logicalNodeId = in.readInt();
address = new Address();
address.readData(in);
long epochOffset = in.readLong();
int maxLogicalNodeCount = in.readInt();
short backupCount = in.readShort();
SnowcastEpoch epoch = SnowcastEpoch.byTimestamp(epochOffset);
definition = new SequencerDefinition(getSequencerName(), epoch, maxLogicalNodeCount, backupCount);
}
示例11: readData
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput in) throws IOException {
totalPrice = in.readDouble();
date = new Date(in.readLong());
id = in.readLong();
int count = in.readInt();
items = new ArrayList<>(count);
for(int i=0; i<count; i++) {
BookCartItem cartItem = new BookCartItem();
cartItem.readData(in);
items.add(cartItem);
}
}
示例12: readData
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(final ObjectDataInput in) throws IOException {
super.readData(in);
concurrent = in.readBoolean();
markerId = in.readUTF();
multiplicity = in.readInt();
timeout = in.readLong();
expiredTimestamp = in.readLong();
}
示例13: readData
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput in) throws IOException
{
id = in.readLong();
topic = in.readUTF();
type = in.readUTF();
timestamp = in.readLong();
payload = in.readByteArray();
doReadData(in);
}
示例14: readData
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput in) throws IOException {
super.readData(in);
concurrent = in.readBoolean();
markerId = in.readUTF();
multiplicity = in.readInt();
timeout = in.readLong();
expiredTimestamp = in.readLong();
}
示例15: readData
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput in) throws IOException {
lock = in.readObject();
newValue = in.readObject();
newVersion = in.readObject();
nextMarkerId = in.readUTF();
timestamp = in.readLong();
}