本文整理汇总了Java中com.esotericsoftware.kryo.io.Input.readLong方法的典型用法代码示例。如果您正苦于以下问题:Java Input.readLong方法的具体用法?Java Input.readLong怎么用?Java Input.readLong使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.esotericsoftware.kryo.io.Input
的用法示例。
在下文中一共展示了Input.readLong方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: read
import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
public ArrayMetaData<long[]> read(Kryo kryo, Input input, Class<ArrayMetaData<long[]>> type) {
try {
long[] arrData = arrayMetaData.getArrData();
thatArrMetaData = arrayMetaData.recv(input);
int arrSegNum = thatArrMetaData.getSegNum();
for (int i = 0; i < arrSegNum; i++) {
int from = thatArrMetaData.getFrom(i);
int to = thatArrMetaData.getTo(i);
for (int j = from; j < to; j++) {
arrData[j] = input.readLong();
}
}
thatArrMetaData.setArrData(arrData);
} catch (IOException e) {
LOG.error("double array read exception", e);
System.exit(1);
}
return thatArrMetaData;
}
示例2: read
import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
public LongMap read (Kryo kryo, Input input, Class<LongMap> type) {
int length = input.readVarInt(true);
input.readBoolean(); // currently unused
LongMap map = new LongMap(length);
Class valueClass = null;
Serializer valueSerializer = null;
if (valueGenericType != null) {
valueClass = valueGenericType;
if (valueSerializer == null) valueSerializer = kryo.getSerializer(valueClass);
valueGenericType = null;
}
kryo.reference(map);
for (int i = 0; i < length; i++) {
long key = input.readLong();
Object value;
if (valueSerializer != null) {
value = kryo.readObjectOrNull(input, valueClass, valueSerializer);
} else
value = kryo.readClassAndObject(input);
map.put(key, value);
}
return map;
}
示例3: read
import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public DefaultPort read(Kryo kryo, Input input, Class<DefaultPort> aClass) {
Element element = (Element) kryo.readClassAndObject(input);
PortNumber number = kryo.readObject(input, PortNumber.class);
boolean isEnabled = input.readBoolean();
Port.Type type = kryo.readObject(input, Port.Type.class);
long portSpeed = input.readLong();
Annotations annotations = (Annotations) kryo.readClassAndObject(input);
return new DefaultPort(element, number, isEnabled, type, portSpeed, annotations);
}
示例4: read
import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public HostLocation read(Kryo kryo, Input input, Class<HostLocation> type) {
DeviceId deviceId = (DeviceId) kryo.readClassAndObject(input);
PortNumber portNumber = (PortNumber) kryo.readClassAndObject(input);
long time = input.readLong();
return new HostLocation(deviceId, portNumber, time);
}
示例5: read
import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public RandomXS128 read(Kryo kryo, Input input, Class<RandomXS128> type) {
long seed0 = input.readLong();
long seed1 = input.readLong();
return new RandomXS128(seed0, seed1);
}
示例6: read
import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public MastershipBasedTimestamp read(Kryo kryo, Input input, Class<MastershipBasedTimestamp> type) {
final long term = input.readLong();
final long sequence = input.readLong();
return new MastershipBasedTimestamp(term, sequence);
}
示例7: read
import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public MastershipTerm read(Kryo kryo, Input input, Class<MastershipTerm> type) {
final NodeId node = (NodeId) kryo.readClassAndObject(input);
final long term = input.readLong();
return MastershipTerm.of(node, term);
}