本文整理汇总了Java中com.hazelcast.nio.ObjectDataOutput.writeBoolean方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectDataOutput.writeBoolean方法的具体用法?Java ObjectDataOutput.writeBoolean怎么用?Java ObjectDataOutput.writeBoolean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.hazelcast.nio.ObjectDataOutput
的用法示例。
在下文中一共展示了ObjectDataOutput.writeBoolean方法的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);
}
示例2: write
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void write(final ObjectDataOutput out, final CacheEntry object)
throws IOException {
try {
out.writeBoolean(object.isReferenceEntry());
if (object.isReferenceEntry()) {
// Reference entries are not disassembled. Instead, to be serialized, they rely entirely on
// the entity itself being Serializable. This is not a common thing (Hibernate is currently
// very restrictive about what can be cached by reference), so it may not be worth dealing
// with at all. This is just a naive implementation relying on the entity's serialization.
writeReference(out, object);
} else {
writeDisassembled(out, object);
}
} catch (Exception e) {
throw rethrow(e);
}
}
示例3: write
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void write(ObjectDataOutput out, CacheEntry object)
throws IOException {
try {
Serializable[] disassembledState = (Serializable[]) UNSAFE.getObject(object, DISASSEMBLED_STATE_OFFSET);
String subclass = (String) UNSAFE.getObject(object, SUBCLASS_OFFSET);
boolean lazyPropertiesAreUnfetched = UNSAFE.getBoolean(object, LAZY_PROPERTIES_ARE_UNFETCHED);
Object version = UNSAFE.getObject(object, VERSION_OFFSET);
out.writeInt(disassembledState.length);
for (Serializable state : disassembledState) {
out.writeObject(state);
}
out.writeUTF(subclass);
out.writeBoolean(lazyPropertiesAreUnfetched);
out.writeObject(version);
} catch (Exception e) {
if (e instanceof IOException) {
throw (IOException) e;
}
throw new IOException(e);
}
}
示例4: write
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void write(ObjectDataOutput out, CacheEntry object)
throws IOException {
try {
out.writeBoolean(object.isReferenceEntry());
if (object.isReferenceEntry()) {
// Reference entries are not disassembled. Instead, to be serialized, they rely entirely on
// the entity itself being Serializable. This is not a common thing (Hibernate is currently
// very restrictive about what can be cached by reference), so it may not be worth dealing
// with at all. This is just a naive implementation relying on the entity's serialization.
writeReference(out, object);
} else {
writeDisassembled(out, object);
}
} catch (Exception e) {
throw rethrow(e);
}
}
示例5: write
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void write(ObjectDataOutput out, XQItemType type) throws IOException {
try {
int kind = type.getItemKind();
out.writeInt(kind);
if (isBaseTypeSupported(kind)) {
out.writeInt(type.getBaseType());
//out.writeObject(type.getTypeName());
writeQName(out, type.getTypeName());
}
if (isNodeNameSupported(kind)) { // || isPINameSupported(kind)) {
//out.writeObject(type.getNodeName()); // can be issues with wildcards
writeQName(out, type.getNodeName());
}
if (type.getSchemaURI() == null) {
out.writeBoolean(false);
} else {
out.writeBoolean(true);
out.writeUTF(type.getSchemaURI().toString());
}
out.writeBoolean(type.isElementNillable());
} catch (XQException ex) {
throw new IOException(ex);
}
}
示例6: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
out.writeUTF(id);
out.writeUTF(bookId);
out.writeDouble(cost);
out.writeInt(quantity);
out.writeBoolean(inStock);
}
示例7: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
out.writeInt(id);
out.writeUTF(topicName);
out.writeUTF(publisherId);
out.writeByteArray(message);
out.writeInt(qos != null ? qos.value() : Byte.MIN_VALUE);
out.writeBoolean(isRetain);
}
示例8: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
out.writeUTF(name);
out.writeBoolean(retainedMessage != null);
if (retainedMessage != null) {
retainedMessage.writeData(out);
}
}
示例9: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
out.writeUTF(clientId);
out.writeBoolean(topic != null);
if (topic != null) {
topic.writeData(out);
}
out.writeBoolean(message != null);
if (message != null) {
message.writeData(out);
}
}
示例10: 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);
}
示例11: writeDisassembled
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
private static void writeDisassembled(final ObjectDataOutput out, final CacheEntry object)
throws IOException {
Serializable[] disassembledState = object.getDisassembledState();
out.writeInt(disassembledState.length);
for (Serializable state : disassembledState) {
out.writeObject(state);
}
out.writeUTF(object.getSubclass());
out.writeBoolean(object.areLazyPropertiesUnfetched());
out.writeObject(object.getVersion());
}
示例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);
}
示例13: writeDisassembled
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
private static void writeDisassembled(ObjectDataOutput out, CacheEntry object)
throws IOException {
Serializable[] disassembledState = object.getDisassembledState();
out.writeInt(disassembledState.length);
for (Serializable state : disassembledState) {
out.writeObject(state);
}
out.writeUTF(object.getSubclass());
out.writeBoolean(object.areLazyPropertiesUnfetched());
out.writeObject(object.getVersion());
}
示例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);
}
示例15: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
out.writeInt(oppositeVertexId);
out.writeInt(destOrdinal);
out.writeInt(sourceOrdinal);
out.writeInt(priority);
out.writeBoolean(isDistributed);
out.writeObject(routingPolicy);
CustomClassLoadedObject.write(out, partitioner);
out.writeObject(config);
}