本文整理汇总了Java中com.hazelcast.nio.ObjectDataInput.readInt方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectDataInput.readInt方法的具体用法?Java ObjectDataInput.readInt怎么用?Java ObjectDataInput.readInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.hazelcast.nio.ObjectDataInput
的用法示例。
在下文中一共展示了ObjectDataInput.readInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: read
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public CacheKey read(ObjectDataInput in)
throws IOException {
try {
Object key = in.readObject();
Type type = in.readObject();
String entityOrRoleName = in.readUTF();
EntityMode entityMode = EntityMode.parse(in.readUTF());
int hashCode = in.readInt();
CacheKey cacheKey = (CacheKey) UNSAFE.allocateInstance(CacheKey.class);
UNSAFE.putObjectVolatile(cacheKey, KEY_OFFSET, key);
UNSAFE.putObjectVolatile(cacheKey, TYPE_OFFSET, type);
UNSAFE.putObjectVolatile(cacheKey, ENTITY_OR_ROLE_NAME_OFFSET, entityOrRoleName);
UNSAFE.putObjectVolatile(cacheKey, ENTITY_MODE_OFFSET, entityMode);
UNSAFE.putIntVolatile(cacheKey, HASH_CODE_OFFSET, hashCode);
return cacheKey;
} catch (Exception e) {
if (e instanceof IOException) {
throw (IOException) e;
}
throw new IOException(e);
}
}
示例2: read
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public CacheKey read(ObjectDataInput in)
throws IOException {
try {
Object key = in.readObject();
Type type = in.readObject();
String entityOrRoleName = in.readUTF();
String tenantId = in.readUTF();
int hashCode = in.readInt();
CacheKey cacheKey = (CacheKey) UNSAFE.allocateInstance(CacheKey.class);
UNSAFE.putObjectVolatile(cacheKey, KEY_OFFSET, key);
UNSAFE.putObjectVolatile(cacheKey, TYPE_OFFSET, type);
UNSAFE.putObjectVolatile(cacheKey, ENTITY_OR_ROLE_NAME_OFFSET, entityOrRoleName);
UNSAFE.putObjectVolatile(cacheKey, TENANT_ID_OFFSET, tenantId);
UNSAFE.putIntVolatile(cacheKey, HASH_CODE_OFFSET, hashCode);
return cacheKey;
} catch (Exception e) {
if (e instanceof IOException) {
throw (IOException) e;
}
throw new IOException(e);
}
}
示例3: 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();
}
}
示例4: 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);
};
}
示例5: 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();
}
}
示例6: readData
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput in) throws IOException {
int vertexCount = in.readInt();
for (int i = 0; i < vertexCount; i++) {
String key = in.readObject();
Vertex value = in.readObject();
nameToVertex.put(key, value);
}
int edgeCount = in.readInt();
for (int i = 0; i < edgeCount; i++) {
Edge edge = in.readObject();
edge.restoreSourceAndDest(nameToVertex);
edges.add(edge);
}
verticesByIdentity.addAll(nameToVertex.values());
}
示例7: 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);
}
示例8: read
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public KryoMarker read(ObjectDataInput in)
throws IOException {
String className = in.readUTF();
int dataLength = in.readInt();
byte[] data = new byte[dataLength];
in.readFully(data);
try (Input input = new UnsafeInput(data)) {
Class<? extends KryoMarker> clazz = (Class<? extends KryoMarker>) Class.forName(className);
return getKryo().readObject(input, clazz);
} catch (ClassNotFoundException e) {
throw new IOException(e);
}
}
示例9: 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();
}
示例10: readData
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput in)
throws IOException {
id = in.readInt();
name = in.readUTF();
abbreviation = in.readUTF();
country = in.readUTF();
type = in.readUTF();
sort = in.readInt();
status = in.readUTF();
occupied = in.readUTF();
notes = in.readUTF();
fipsState = in.readInt();
assocPress = in.readUTF();
standardFederalRegion = in.readUTF();
censusRegion = in.readInt();
censusRegionName = in.readUTF();
censusDivision = in.readInt();
censusDevisionName = in.readUTF();
circuitCourt = in.readInt();
}
示例11: readData
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput in) throws IOException {
hazelcastPort = in.readInt();
indexName = in.readUTF();
newMemberToSegmentMap = new HashMap<>();
int count = in.readInt();
for (int i = 0; i < count; i++) {
MemberImpl mi = new MemberImpl();
mi.readData(in);
Set<Integer> segments = new HashSet<>();
int segCount = in.readInt();
for (int j = 0; j < segCount; j++) {
segments.add(in.readInt());
}
newMemberToSegmentMap.put(mi, segments);
}
}
示例12: read
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public Expression read(ObjectDataInput in) throws IOException {
int clnId = in.readInt();
Comparison compType = Comparison.values()[in.readInt()];
byte type = in.readByte();
if (type == 0) {
return new AlwaysExpression(clnId);
}
PathBuilder path = in.readObject();
if (type == 1) {
return new BinaryExpression(clnId, compType, path);
} else {
return new PathExpression(clnId, compType, path, in.readUTF(),
(QueriedPath) in.readObject());
}
}
示例13: readData
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput in) throws IOException {
id = in.readUTF();
bookId = in.readUTF();
cost = in.readDouble();
quantity = in.readInt();
inStock = in.readBoolean();
}
示例14: 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);
}
}
示例15: readData
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput in) throws IOException {
id = in.readInt();
topicName = in.readUTF();
publisherId = in.readUTF();
message = in.readByteArray();
int rawInt = in.readInt();
qos = rawInt != Byte.MIN_VALUE ? MqttQoS.valueOf(rawInt) : null;
isRetain = in.readBoolean();
}