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


Java ObjectOutput.writeLong方法代码示例

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


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

示例1: writeExternal

import java.io.ObjectOutput; //导入方法依赖的package包/类
@Override
public void writeExternal(ObjectOutput out) throws IOException {
    out.writeLong(installSnapshot.getTerm());
    out.writeObject(installSnapshot.leaderId);
    out.writeLong(installSnapshot.lastIncludedIndex);
    out.writeLong(installSnapshot.lastIncludedTerm);
    out.writeInt(installSnapshot.chunkIndex);
    out.writeInt(installSnapshot.totalChunks);

    out.writeByte(installSnapshot.lastChunkHashCode.isPresent() ? 1 : 0);
    if (installSnapshot.lastChunkHashCode.isPresent()) {
        out.writeInt(installSnapshot.lastChunkHashCode.get().intValue());
    }

    out.writeByte(installSnapshot.serverConfig.isPresent() ? 1 : 0);
    if (installSnapshot.serverConfig.isPresent()) {
        out.writeObject(installSnapshot.serverConfig.get());
    }

    out.writeObject(installSnapshot.data);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:22,代码来源:InstallSnapshot.java

示例2: writeExternal

import java.io.ObjectOutput; //导入方法依赖的package包/类
@Override
public void writeExternal(ObjectOutput out) throws IOException {
	super.writeExternal(out);
	
	out.writeLong(iStudentId);
	out.writeLong(iConfigId);
	
	out.writeInt(iSectionIds.size());
	for (Long sectionId: iSectionIds)
		out.writeLong(sectionId);
	
	out.writeBoolean(iTimeStamp != null);
	if (iTimeStamp != null)
		out.writeLong(iTimeStamp.getTime());
	
	out.writeBoolean(iApproval != null);
	if (iApproval != null)
		iApproval.writeExternal(out);
	
	out.writeBoolean(iReservation != null);
	if (iReservation != null)
		iReservation.writeExternal(out);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:24,代码来源:XEnrollment.java

示例3: writeExternal

import java.io.ObjectOutput; //导入方法依赖的package包/类
@Override
public void writeExternal(final ObjectOutput out) throws IOException {
    out.writeLong(snapshot.lastIndex);
    out.writeLong(snapshot.lastTerm);
    out.writeLong(snapshot.lastAppliedIndex);
    out.writeLong(snapshot.lastAppliedTerm);
    out.writeLong(snapshot.electionTerm);
    out.writeObject(snapshot.electionVotedFor);
    out.writeObject(snapshot.serverConfig);

    out.writeInt(snapshot.unAppliedEntries.size());
    for (ReplicatedLogEntry e: snapshot.unAppliedEntries) {
        out.writeLong(e.getIndex());
        out.writeLong(e.getTerm());
        out.writeObject(e.getData());
    }

    out.writeObject(snapshot.state);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:20,代码来源:Snapshot.java

示例4: writeExternal

import java.io.ObjectOutput; //导入方法依赖的package包/类
@Override
public void writeExternal(ObjectOutput out) throws IOException {
    out.writeLong(this.getId());
    out.writeLong(this.getGenerationTime());
    out.writeObject(this.getAlias()); // TODO (de-/encrypt for db)
    out.writeObject(this.getDescription()); // TODO (de-/encrypt for db)
    out.writeObject(this.getUrl()); // TODO (de-/encrypt for db)
    out.writeObject(this.getImage());
    out.writeBoolean(this.getFavorite());
}
 
开发者ID:Naoghuman,项目名称:ABC-List,代码行数:11,代码来源:Link.java

示例5: writeExternal

import java.io.ObjectOutput; //导入方法依赖的package包/类
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
    // VERSION
	out.writeByte( 0 );

    // SUPER
	super.writeExternal( out );

	// NO_ENTRY_KEY
	out.writeLong( no_entry_key );

	// NO_ENTRY_VALUE
	out.writeDouble( no_entry_value );
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:15,代码来源:TLongDoubleHash.java

示例6: writeExternal

import java.io.ObjectOutput; //导入方法依赖的package包/类
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
    // VERSION
	out.writeByte( 0 );

    // SUPER
	super.writeExternal( out );

	// NO_ENTRY_KEY
	out.writeLong( no_entry_key );

	// NO_ENTRY_VALUE
	out.writeChar( no_entry_value );
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:15,代码来源:TLongCharHash.java

示例7: writeExternal

import java.io.ObjectOutput; //导入方法依赖的package包/类
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
    // VERSION
	out.writeByte( 0 );

    // SUPER
	super.writeExternal( out );

	// NO_ENTRY_KEY
	out.writeLong( no_entry_key );

	// NO_ENTRY_VALUE
	out.writeFloat( no_entry_value );
}
 
开发者ID:JianpingZeng,项目名称:xcc,代码行数:15,代码来源:TLongFloatHash.java

示例8: writeExternal

import java.io.ObjectOutput; //导入方法依赖的package包/类
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
    // VERSION
	out.writeByte( 0 );

    // SUPER
	super.writeExternal( out );

	// NO_ENTRY_KEY
	out.writeDouble( no_entry_key );

	// NO_ENTRY_VALUE
	out.writeLong( no_entry_value );
}
 
开发者ID:JianpingZeng,项目名称:xcc,代码行数:15,代码来源:TDoubleLongHash.java

示例9: writeExternal

import java.io.ObjectOutput; //导入方法依赖的package包/类
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
    // VERSION
	out.writeByte( 0 );

    // SUPER
	super.writeExternal( out );

	// NO_ENTRY_KEY
	out.writeByte( no_entry_key );

	// NO_ENTRY_VALUE
	out.writeLong( no_entry_value );
}
 
开发者ID:JianpingZeng,项目名称:xcc,代码行数:15,代码来源:TByteLongHash.java

示例10: writeExternal

import java.io.ObjectOutput; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override public void writeExternal(ObjectOutput out) throws IOException {
    out.writeObject(matrixUuid);
    out.writeObject(affinityKey);
    out.writeLong(blockIdRow);
    out.writeLong(blockIdCol);
}
 
开发者ID:Luodian,项目名称:Higher-Cloud-Computing-Project,代码行数:8,代码来源:MatrixBlockKey.java

示例11: writeExternal

import java.io.ObjectOutput; //导入方法依赖的package包/类
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
    // VERSION
	out.writeByte( 0 );

    // SUPER
	super.writeExternal( out );

	// NO_ENTRY_KEY
	out.writeLong( no_entry_key );

	// NO_ENTRY_VALUE
	out.writeLong( no_entry_value );
}
 
开发者ID:JianpingZeng,项目名称:xcc,代码行数:15,代码来源:TLongLongHash.java

示例12: writeExternal

import java.io.ObjectOutput; //导入方法依赖的package包/类
@Override
public void writeExternal(ObjectOutput out) throws IOException {
	out.writeLong(iDistributionId);
	out.writeInt(iVariant);
	out.writeInt(iType.ordinal());
	
	out.writeInt(iOfferingIds.size());
	for (Long offeringId: iOfferingIds)
		out.writeLong(offeringId);
	
	out.writeInt(iSectionIds.size());
	for (Long sectionId: iSectionIds)
		out.writeLong(sectionId);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:15,代码来源:XDistribution.java

示例13: writeExternal

import java.io.ObjectOutput; //导入方法依赖的package包/类
@Override
public void writeExternal(ObjectOutput out) throws IOException {
    out.writeLong(requestVote.getTerm());
    out.writeObject(requestVote.candidateId);
    out.writeLong(requestVote.lastLogIndex);
    out.writeLong(requestVote.lastLogTerm);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:8,代码来源:RequestVote.java

示例14: writeExternal

import java.io.ObjectOutput; //导入方法依赖的package包/类
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
    // VERSION
	out.writeByte( 0 );

    // SUPER
	super.writeExternal( out );

	// NO_ENTRY_KEY
	out.writeShort( no_entry_key );

	// NO_ENTRY_VALUE
	out.writeLong( no_entry_value );
}
 
开发者ID:JianpingZeng,项目名称:xcc,代码行数:15,代码来源:TShortLongHash.java

示例15: writeExternal

import java.io.ObjectOutput; //导入方法依赖的package包/类
/**
 * Writes this object to the serialized stream.
 * 
 * @param objectOutput
 * @throws IOException
 */
public void writeExternal(ObjectOutput objectOutput)
  throws IOException
{
  objectOutput.writeLong(serialVersionUID);
  objectOutput.writeObject(_wrapped);
  objectOutput.writeObject(_label);
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:14,代码来源:FacesMessageWrapper.java


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