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


Java ObjectDataOutput.writeUTF方法代码示例

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


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

示例1: write

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void write(ObjectDataOutput out, CacheKey object)
        throws IOException {

    try {
        Object key = UNSAFE.getObject(object, KEY_OFFSET);
        Type type = (Type) UNSAFE.getObject(object, TYPE_OFFSET);
        String entityOrRoleName = (String) UNSAFE.getObject(object, ENTITY_OR_ROLE_NAME_OFFSET);
        String tenantId = (String) UNSAFE.getObject(object, TENANT_ID_OFFSET);
        int hashCode = UNSAFE.getInt(object, HASH_CODE_OFFSET);

        out.writeObject(key);
        out.writeObject(type);
        out.writeUTF(entityOrRoleName);
        out.writeUTF(tenantId);
        out.writeInt(hashCode);

    } catch (Exception e) {
        if (e instanceof IOException) {
            throw (IOException) e;
        }
        throw new IOException(e);
    }
}
 
开发者ID:hazelcast,项目名称:hazelcast-hibernate,代码行数:25,代码来源:Hibernate4CacheKeySerializer.java

示例2: 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

示例3: writeData

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out)
        throws IOException {

    out.writeUTF(firstName);
    out.writeUTF(lastName);
    out.writeUTF(companyName);
    out.writeUTF(address);
    out.writeUTF(city);
    out.writeUTF(county);
    out.writeUTF(state);
    out.writeInt(zip);
    out.writeUTF(phone1);
    out.writeUTF(phone2);
    out.writeUTF(email);
    out.writeUTF(web);
}
 
开发者ID:noctarius,项目名称:hazelcast-mapreduce-presentation,代码行数:18,代码来源:Person.java

示例4: 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);
}
 
开发者ID:ivogm,项目名称:bookstore,代码行数:9,代码来源:BookCartItem.java

示例5: 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

示例6: writeData

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
  out.writeUTF(this.clientId);
  out.writeUTF(this.clientSecret);
  out.writeUTF(this.clientType.toString());
  out.writeUTF(this.clientProfile.toString());
  out.writeUTF(this.clientName);
  out.writeUTF(this.clientDesc);
  out.writeUTF(this.ownerId);
  out.writeUTF(this.scope);
  out.writeUTF(this.redirectUri);
  out.writeObject(this.createDt);
  out.writeObject(this.updateDt);
}
 
开发者ID:networknt,项目名称:light-oauth2,代码行数:15,代码来源:Client.java

示例7: 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.writeObject(object.getVersion());
}
 
开发者ID:hazelcast,项目名称:hazelcast-hibernate5,代码行数:13,代码来源:Hibernate52CacheEntrySerializer.java

示例8: 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

示例9: write

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
   public void write(ObjectDataOutput out, MutableRepositoryItemExt[] items) throws IOException {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < items.length; i++) {
    sb.append(items[i].getRepositoryId()).append(GenericsRepository.SPLIT_CHAR).append(items[i].getClass().getCanonicalName());
    if (i != items.length) {
	sb.append(',');
    }
}
out.writeUTF(sb.toString());

   }
 
开发者ID:varelma,项目名称:atg-generics,代码行数:13,代码来源:MutableRepositoryItemExtArrayHazelcastSerializer.java

示例10: writeData

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
    out.writeInt(attributes.size());
    for (Map.Entry<String, Data> entry : attributes.entrySet()) {
        out.writeUTF(entry.getKey());
        out.writeData(entry.getValue());
    }
}
 
开发者ID:hazelcast,项目名称:hazelcast-wm,代码行数:9,代码来源:SessionUpdateEntryProcessor.java

示例11: writeData

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
  out.writeObject(id);
  out.writeUTF(entityOrRoleName);
  out.writeUTF(tenantId);
  out.writeObject(type);
  out.writeInt(hashCode);
}
 
开发者ID:hazelcast,项目名称:hazelcast-hibernate5,代码行数:9,代码来源:CacheKeyImpl.java

示例12: writeData

import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
	out.writeInt(size());

	for (String item : this) {
		out.writeUTF(item);
	}
}
 
开发者ID:anyflow,项目名称:lannister,代码行数:9,代码来源:SerializableStringSet.java

示例13: 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);
    }
}
 
开发者ID:anyflow,项目名称:lannister,代码行数:13,代码来源:Notification.java

示例14: 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());

}
 
开发者ID:hazelcast,项目名称:hazelcast-hibernate,代码行数:15,代码来源:Hibernate42CacheEntrySerializer.java

示例15: 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


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