java.io.ObjectOutput#writeLong ( )源码实例Demo

下面列出了java.io.ObjectOutput#writeLong ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: ignite   文件: VisorIgfsMetrics.java
/** {@inheritDoc} */
@Override protected void writeExternalData(ObjectOutput out) throws IOException {
    out.writeLong(totalSpaceSz);
    out.writeLong(usedSpaceSz);
    out.writeInt(foldersCnt);
    out.writeInt(filesCnt);
    out.writeInt(filesOpenedForRd);
    out.writeInt(filesOpenedForWrt);
    out.writeLong(blocksRd);
    out.writeLong(blocksRdRmt);
    out.writeLong(blocksWrt);
    out.writeLong(blocksWrtRmt);
    out.writeLong(bytesRd);
    out.writeLong(bytesRdTm);
    out.writeLong(bytesWrt);
    out.writeLong(bytesWrtTm);
}
 
源代码2 项目: spliceengine   文件: UpdateTableWriterBuilder.java
@Override
public void writeExternal(ObjectOutput out) throws IOException {
    out.writeBoolean(operationContext!=null);
    if (operationContext!=null)
        out.writeObject(operationContext);
    out.writeLong(heapConglom);
    out.writeLong(tempConglomID);
    ArrayUtil.writeIntArray(out, formatIds);
    ArrayUtil.writeIntArray(out, columnOrdering);
    ArrayUtil.writeIntArray(out, pkCols);
    out.writeObject(pkColumns);
    out.writeObject(heapList);
    out.writeUTF(tableVersion);
    SIDriver.driver().getOperationFactory().writeTxn(txn, out);
    ArrayUtil.writeIntArray(out, execRowTypeFormatIds);
    ArrayUtil.writeIntArray(out, updateCounts);
}
 
源代码3 项目: ignite   文件: WebSession.java
/** {@inheritDoc} */
@Override public void writeExternal(ObjectOutput out) throws IOException {
    U.writeString(out, id);
    out.writeLong(createTime);
    out.writeLong(accessTime);
    out.writeInt(maxInactiveInterval);
    U.writeMap(out, attrs);
}
 
源代码4 项目: jdk8u_jdk   文件: UnicastRef.java
/**
 * Marshal value to an ObjectOutput sink using RMI's serialization
 * format for parameters or return values.
 */
protected static void marshalValue(Class<?> type, Object value,
                                   ObjectOutput out)
    throws IOException
{
    if (type.isPrimitive()) {
        if (type == int.class) {
            out.writeInt(((Integer) value).intValue());
        } else if (type == boolean.class) {
            out.writeBoolean(((Boolean) value).booleanValue());
        } else if (type == byte.class) {
            out.writeByte(((Byte) value).byteValue());
        } else if (type == char.class) {
            out.writeChar(((Character) value).charValue());
        } else if (type == short.class) {
            out.writeShort(((Short) value).shortValue());
        } else if (type == long.class) {
            out.writeLong(((Long) value).longValue());
        } else if (type == float.class) {
            out.writeFloat(((Float) value).floatValue());
        } else if (type == double.class) {
            out.writeDouble(((Double) value).doubleValue());
        } else {
            throw new Error("Unrecognized primitive type: " + type);
        }
    } else {
        out.writeObject(value);
    }
}
 
源代码5 项目: openjdk-8   文件: UnicastRef.java
/**
 * Marshal value to an ObjectOutput sink using RMI's serialization
 * format for parameters or return values.
 */
protected static void marshalValue(Class<?> type, Object value,
                                   ObjectOutput out)
    throws IOException
{
    if (type.isPrimitive()) {
        if (type == int.class) {
            out.writeInt(((Integer) value).intValue());
        } else if (type == boolean.class) {
            out.writeBoolean(((Boolean) value).booleanValue());
        } else if (type == byte.class) {
            out.writeByte(((Byte) value).byteValue());
        } else if (type == char.class) {
            out.writeChar(((Character) value).charValue());
        } else if (type == short.class) {
            out.writeShort(((Short) value).shortValue());
        } else if (type == long.class) {
            out.writeLong(((Long) value).longValue());
        } else if (type == float.class) {
            out.writeFloat(((Float) value).floatValue());
        } else if (type == double.class) {
            out.writeDouble(((Double) value).doubleValue());
        } else {
            throw new Error("Unrecognized primitive type: " + type);
        }
    } else {
        out.writeObject(value);
    }
}
 
源代码6 项目: dragonwell8_jdk   文件: ExternObjTrees.java
public void writeExternal(ObjectOutput out) throws IOException {
    out.writeBoolean(z);
    out.writeByte(b);
    out.writeChar(c);
    out.writeShort(s);
    out.writeInt(i);
    out.writeFloat(f);
    out.writeLong(j);
    out.writeDouble(d);
    out.writeObject(str);
    out.writeObject(parent);
    out.writeObject(left);
    out.writeObject(right);
}
 
源代码7 项目: ignite   文件: VisorFileBlockTaskArg.java
/** {@inheritDoc} */
@Override protected void writeExternalData(ObjectOutput out) throws IOException {
    U.writeString(out, path);
    out.writeLong(off);
    out.writeInt(blockSz);
    out.writeLong(lastModified);
}
 
源代码8 项目: spliceengine   文件: DistributedPopulatePinJob.java
@Override
public void writeExternal(ObjectOutput out) throws IOException {
    out.writeObject(scanSetBuilder);
    out.writeUTF(scope);
    out.writeUTF(jobGroup);
    out.writeUTF(prefix);
    out.writeLong(conglomID);
}
 
源代码9 项目: realtime-analytics   文件: Counter.java
@Override
public void writeExternal(ObjectOutput out) throws IOException {
    out.writeLong(totalValue.get());
    out.writeLong(oldsnapshotValue);
    out.writeLong(snapshotValue);
    out.writeObject(lastCounterTime);
}
 
源代码10 项目: Chronicle-Map   文件: SomeClass.java
@Override
public void writeExternal(ObjectOutput out) throws IOException {
    out.writeLong(id);
    out.writeInt(hits.size());
    for (int i = 0; i < hits.size(); i++) {
        out.writeObject(hits.get(i));
    }
}
 
源代码11 项目: gemfirexd-oss   文件: ChecksumOperation.java
public void writeExternal(ObjectOutput out) throws IOException 
{	
	checksumValue = checksum.getValue();
	out.writeByte(checksumAlgo);
	out.writeInt(dataLength);
	out.writeLong(checksumValue);
}
 
源代码12 项目: gemfirexd-oss   文件: NakAckHeader.java
public void writeExternal(ObjectOutput out) throws IOException {
out.writeInt(type);
out.writeLong(seqno);
out.writeLong(last_seqno);
out.writeObject(vid);
out.writeObject(stable_msgs);
out.writeObject(sender);
   }
 
源代码13 项目: unitime   文件: XRequest.java
@Override
public void writeExternal(ObjectOutput out) throws IOException {
	out.writeLong(iRequestId);
	out.writeInt(iPriority);
	out.writeBoolean(iAlternative);
	out.writeLong(iStudentId);
}
 
源代码14 项目: unitime   文件: XConfig.java
@Override
public void writeExternal(ObjectOutput out) throws IOException {
	out.writeLong(iUniqueId);
	out.writeObject(iName);
	out.writeLong(iOfferingId);
	out.writeInt(iLimit);
	
	out.writeInt(iSubparts.size());
	for (XSubpart subpart: iSubparts)
		subpart.writeExternal(out);
	
	out.writeBoolean(iInstructionalMethod != null);
	if (iInstructionalMethod != null)
		iInstructionalMethod.writeExternal(out);
}
 
源代码15 项目: tomee   文件: ClusterMetaData.java
@Override
public void writeExternal(final ObjectOutput out) throws IOException {
    // write out the version of the serialized data for future use
    out.writeByte(1);

    out.writeLong(version);
    out.writeObject(connectionStrategy);
    out.writeInt(locations.length);
    for (final URI uri : locations) {
        out.writeObject(uri.toString());
    }
}
 
源代码16 项目: butterfly   文件: UserPhases.java
@Override
public void writeExternal(ObjectOutput out) throws IOException {
    out.writeLong(this.id);
    out.writeObject(this.user);
    out.writeInt(this.ddr16Phase);
}
 
源代码17 项目: gemfirexd-oss   文件: RemoveFileOperation.java
public void writeExternal(ObjectOutput out) throws IOException
{
	out.writeUTF(name);
	out.writeLong(generationId);
	out.writeBoolean(removeAtOnce);
}
 
public void writeExternal(ObjectOutput out) throws IOException {
    super.writeExternal(out);
    out.writeLong(minDev);
    out.writeLong(maxDev);
    out.writeObject( paramText );
}
 
源代码19 项目: database   文件: Slice.java
public void writeExternal(ObjectOutput out) throws IOException {

        out.writeLong(offset);
        out.writeLong(limit);
        out.writeLong(last);
        
    }
 
源代码20 项目: database   文件: Checkpoint.java
@Override
   public void writeExternal(final ObjectOutput out) throws IOException {

       out.writeInt(currentVersion);

       out.writeLong(addrMetadata);

       out.writeLong(addrRoot);
       
       out.writeLong(addrBloomFilter);

       out.writeInt(height);

	if (currentVersion <= VERSION1) {

		if (nnodes > Integer.MAX_VALUE)
			throw new RuntimeException();
		if (nleaves > Integer.MAX_VALUE)
			throw new RuntimeException();
		if (nentries > Integer.MAX_VALUE)
			throw new RuntimeException();
		
		out.writeInt((int)nnodes);

		out.writeInt((int)nleaves);

		out.writeInt((int)nentries);

	} else {

		out.writeLong(nnodes);

		out.writeLong(nleaves);

		out.writeLong(nentries);

		out.writeLong(recordVersion);

	}

       out.writeLong(counter);

       /*
        * 8 bytes follow. 
        */
       
       out.writeShort(indexType.getCode());
	out.writeShort(0/* unused */);
	out.writeInt(0/* unused */);

	/*
	 * 8 bytes follow.
	 */

	out.writeLong(0L/* unused */);

	/*
	 * Additional space added in VERSION2.
	 */
	for (int i = 0; i < 10; i++) {

		out.writeLong(0L/* unused */);

	}
	
}