Java Code Examples for java.io.ObjectOutput#writeLong()

The following examples show how to use java.io.ObjectOutput#writeLong() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UpdateTableWriterBuilder.java    From spliceengine with GNU Affero General Public License v3.0 6 votes vote down vote up
@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);
}
 
Example 2
Source File: VisorIgfsMetrics.java    From ignite with Apache License 2.0 6 votes vote down vote up
/** {@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);
}
 
Example 3
Source File: WebSession.java    From ignite with Apache License 2.0 5 votes vote down vote up
/** {@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);
}
 
Example 4
Source File: ClusterMetaData.java    From tomee with Apache License 2.0 5 votes vote down vote up
@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());
    }
}
 
Example 5
Source File: XConfig.java    From unitime with Apache License 2.0 5 votes vote down vote up
@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);
}
 
Example 6
Source File: XRequest.java    From unitime with Apache License 2.0 5 votes vote down vote up
@Override
public void writeExternal(ObjectOutput out) throws IOException {
	out.writeLong(iRequestId);
	out.writeInt(iPriority);
	out.writeBoolean(iAlternative);
	out.writeLong(iStudentId);
}
 
Example 7
Source File: NakAckHeader.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
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);
   }
 
Example 8
Source File: ChecksumOperation.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
public void writeExternal(ObjectOutput out) throws IOException 
{	
	checksumValue = checksum.getValue();
	out.writeByte(checksumAlgo);
	out.writeInt(dataLength);
	out.writeLong(checksumValue);
}
 
Example 9
Source File: SomeClass.java    From Chronicle-Map with Apache License 2.0 5 votes vote down vote up
@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));
    }
}
 
Example 10
Source File: Counter.java    From realtime-analytics with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void writeExternal(ObjectOutput out) throws IOException {
    out.writeLong(totalValue.get());
    out.writeLong(oldsnapshotValue);
    out.writeLong(snapshotValue);
    out.writeObject(lastCounterTime);
}
 
Example 11
Source File: DistributedPopulatePinJob.java    From spliceengine with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void writeExternal(ObjectOutput out) throws IOException {
    out.writeObject(scanSetBuilder);
    out.writeUTF(scope);
    out.writeUTF(jobGroup);
    out.writeUTF(prefix);
    out.writeLong(conglomID);
}
 
Example 12
Source File: VisorFileBlockTaskArg.java    From ignite with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override protected void writeExternalData(ObjectOutput out) throws IOException {
    U.writeString(out, path);
    out.writeLong(off);
    out.writeInt(blockSz);
    out.writeLong(lastModified);
}
 
Example 13
Source File: ExternObjTrees.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
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);
}
 
Example 14
Source File: UnicastRef.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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);
    }
}
 
Example 15
Source File: UnicastRef.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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);
    }
}
 
Example 16
Source File: UserPhases.java    From butterfly with Apache License 2.0 4 votes vote down vote up
@Override
public void writeExternal(ObjectOutput out) throws IOException {
    out.writeLong(this.id);
    out.writeObject(this.user);
    out.writeInt(this.ddr16Phase);
}
 
Example 17
Source File: RemoveFileOperation.java    From gemfirexd-oss with Apache License 2.0 4 votes vote down vote up
public void writeExternal(ObjectOutput out) throws IOException
{
	out.writeUTF(name);
	out.writeLong(generationId);
	out.writeBoolean(removeAtOnce);
}
 
Example 18
Source File: OverlappedByEvaluatorDefinition.java    From kogito-runtimes with Apache License 2.0 4 votes vote down vote up
public void writeExternal(ObjectOutput out) throws IOException {
    super.writeExternal(out);
    out.writeLong(minDev);
    out.writeLong(maxDev);
    out.writeObject( paramText );
}
 
Example 19
Source File: Slice.java    From database with GNU General Public License v2.0 3 votes vote down vote up
public void writeExternal(ObjectOutput out) throws IOException {

        out.writeLong(offset);
        out.writeLong(limit);
        out.writeLong(last);
        
    }
 
Example 20
Source File: Checkpoint.java    From database with GNU General Public License v2.0 2 votes vote down vote up
@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 */);

	}
	
}