java.io.ObjectInput#readLong ( )源码实例Demo

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

/** {@inheritDoc} */
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    setArguments(in.readObject());

    isVal = in.readBoolean();
    bVal = in.readByte();
    cVal = in.readChar();
    sVal = in.readShort();
    intVal = in.readInt();
    lVal = in.readLong();
    fltVal = in.readFloat();
    dblVal = in.readDouble();
    strVal = (String)in.readObject();
    arrVal = (Object[])in.readObject();
    eVal = (TestJobEnum)in.readObject();
}
 
源代码2 项目: ignite   文件: VisorThreadInfo.java
/** {@inheritDoc} */
@Override protected void readExternalData(byte protoVer, ObjectInput in) throws IOException, ClassNotFoundException {
    name = U.readString(in);
    id = in.readLong();

    String statePresentation = U.readString(in);

    if (statePresentation != null)
        state = Enum.valueOf(Thread.State.class, statePresentation);

    lock = (VisorThreadLockInfo)in.readObject();
    lockName = U.readString(in);
    lockOwnerId = in.readLong();
    lockOwnerName = U.readString(in);
    inNative = in.readBoolean();
    suspended = in.readBoolean();
    waitedCnt = in.readLong();
    waitedTime = in.readLong();
    blockedCnt = in.readLong();
    blockedTime = in.readLong();
    stackTrace = U.readList(in);
    locks = U.readList(in);
    lockedMonitors = U.readList(in);
}
 
源代码3 项目: gemfirexd-oss   文件: FD_PROB.java
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    int num;
    type=in.readInt();

    num=in.readInt();
    if(num == 0)
        members=null;
    else {
        members=(Address[]) in.readObject();
    }

    num=in.readInt();
    if(num == 0)
        counters=null;
    else {
        counters=new long[num];
        for(int i=0; i < counters.length; i++)
            counters[i]=in.readLong();
    }
}
 
源代码4 项目: ignite   文件: Person.java
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    personNum = in.readLong();
    firstName = (String)in.readObject();
    lastName = (String)in.readObject();
    age = in.readShort();
    married = in.readBoolean();
    height = in.readLong();
    weight = in.readFloat();
    birthDate = (Date)in.readObject();
    phones = (List<String>)in.readObject();
}
 
源代码5 项目: org.openntf.domino   文件: DateTime.java
@Override
public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
	dst_ = in.readBoolean();
	isDateOnly_ = in.readBoolean();
	isTimeOnly_ = in.readBoolean();
	notesZone_ = in.readInt();
	date_ = new Date(in.readLong());
}
 
/**
 * Read this object from a stream of stored objects.
 *
 * @param in read this.
 *
 * @exception IOException					thrown on error
 * @exception ClassNotFoundException		thrown on error
 */
   @Override
public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException {
	conglomId = in.readLong();
	heapSCOCI = (StaticCompiledOpenConglomInfo) in.readObject();
	irgs = new IndexRowGenerator[ArrayUtil.readArrayLength(in)];
	ArrayUtil.readArrayItems(in, irgs);

	indexCIDS = ArrayUtil.readLongArray(in);
	indexSCOCIs = new StaticCompiledOpenConglomInfo[ArrayUtil.readArrayLength(in)];
	ArrayUtil.readArrayItems(in, indexSCOCIs);

	deferred = in.readBoolean();
	targetProperties = (Properties) in.readObject();
	targetUUID = (UUID) in.readObject();
	lockMode = in.readInt();

	fkInfo = new FKInfo[ArrayUtil.readArrayLength(in)];
	ArrayUtil.readArrayItems(in, fkInfo);

	triggerInfo = (TriggerInfo)in.readObject();

	baseRowReadList = (FormatableBitSet)in.readObject();
	baseRowReadMap = ArrayUtil.readIntArray(in);
	streamStorableHeapColIds = ArrayUtil.readIntArray(in); 
	singleRowSource = in.readBoolean();
	indexNames = ArrayUtil.readStringArray(in);

       if(in.readBoolean()){
           pkColumns = new int[in.readInt()];
           for(int i=0;i<pkColumns.length;i++){
               pkColumns[i] = in.readInt();
           }
       }
}
 
源代码7 项目: spliceengine   文件: ColumnStatisticsImpl.java
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    NativeMemory quantMem = null;
    NativeMemory freqMem = null;
    NativeMemory thetaMem = null;
    try {
        nullCount = in.readLong();
        dvd = (DataValueDescriptor) in.readObject();
        byte[] quantiles = new byte[in.readInt()];
        in.readFully(quantiles);
        quantMem = new NativeMemory(quantiles);
        quantilesSketch = com.yahoo.sketches.quantiles.ItemsSketch.getInstance(quantMem, dvd, new DVDArrayOfItemsSerDe(dvd));
        byte[] frequencies = new byte[in.readInt()];
        in.readFully(frequencies);
        freqMem = new NativeMemory(frequencies);
        frequenciesSketch = com.yahoo.sketches.frequencies.ItemsSketch.getInstance(freqMem, new DVDArrayOfItemsSerDe(dvd));
        byte[] thetaSketchBytes = new byte[in.readInt()];
        in.readFully(thetaSketchBytes);
        thetaMem = new NativeMemory(thetaSketchBytes);
        thetaSketch = Sketch.heapify(thetaMem);
    } finally {
        if (quantMem!=null)
            quantMem.freeMemory();
        if (freqMem!=null)
            freqMem.freeMemory();
        if (thetaMem!=null)
            thetaMem.freeMemory();

    }
}
 
源代码8 项目: gemfirexd-oss   文件: WriteCursorConstantAction.java
/**
 * Read this object from a stream of stored objects.
 *
 * @param in read this.
 *
 * @exception IOException					thrown on error
 * @exception ClassNotFoundException		thrown on error
 */
public void readExternal( ObjectInput in )
	 throws IOException, ClassNotFoundException
{
	conglomId = in.readLong();
	heapSCOCI = (StaticCompiledOpenConglomInfo) in.readObject();
	irgs = new IndexRowGenerator[ArrayUtil.readArrayLength(in)];
	ArrayUtil.readArrayItems(in, irgs);

	indexCIDS = ArrayUtil.readLongArray(in);
	indexSCOCIs = new StaticCompiledOpenConglomInfo[ArrayUtil.readArrayLength(in)];
	ArrayUtil.readArrayItems(in, indexSCOCIs);

	deferred = in.readBoolean();
	targetProperties = (Properties) in.readObject();
	targetUUID = (UUID) in.readObject();
	lockMode = in.readInt();

	fkInfo = new FKInfo[ArrayUtil.readArrayLength(in)];
	ArrayUtil.readArrayItems(in, fkInfo);

	triggerInfo = (TriggerInfo)in.readObject();

	baseRowReadList = (FormatableBitSet)in.readObject();
	baseRowReadMap = ArrayUtil.readIntArray(in);
	streamStorableHeapColIds = ArrayUtil.readIntArray(in); 
	singleRowSource = in.readBoolean();
	indexNames = ArrayUtil.readStringArray(in);
}
 
源代码9 项目: reladomo   文件: MithraTimestamp.java
public static Timestamp readTimestampWithInfinity(ObjectInput in, Timestamp infinity) throws IOException
{
    byte serialType = in.readByte();
    if (serialType == IS_NULL) return null;
    if (serialType == IS_INFINITY) return infinity;

    long time = in.readLong();
    return createImmutableTimestamp(in, serialType, time);
}
 
源代码10 项目: reladomo   文件: FastUnsafeOffHeapPageBuffer.java
public int readNewPage(ObjectInput in, int masterPageIndex) throws IOException
{
    long pageVersion = in.readLong();
    this.masterPageIndicies.add(masterPageIndex);
    this.masterPageVersions.add(pageVersion);
    int bufferPageIndex = this.masterPageIndicies.size() - 1;
    readPageAndUsedData(in, bufferPageIndex);
    return bufferPageIndex;
}
 
源代码11 项目: ignite   文件: VisorMemoryPolicyConfiguration.java
/** {@inheritDoc} */
@Override protected void readExternalData(byte protoVer, ObjectInput in) throws IOException, ClassNotFoundException {
    name = U.readString(in);
    initSize = in.readLong();
    maxSize = in.readLong();
    swapFilePath = U.readString(in);
    pageEvictionMode = DataPageEvictionMode.fromOrdinal(in.readByte());
    evictionThreshold = in.readDouble();
    emptyPagesPoolSize = in.readInt();
}
 
源代码12 项目: ignite   文件: VisorMemoryConfiguration.java
/** {@inheritDoc} */
@Override protected void readExternalData(byte protoVer, ObjectInput in) throws IOException, ClassNotFoundException {
    sysCacheInitSize = in.readLong();
    sysCacheMaxSize = in.readLong();
    pageSize = in.readInt();
    concLvl = in.readInt();
    dfltMemPlcName = U.readString(in);
    dfltMemPlcSize = in.readLong();
    memPlcs = U.readList(in);
}
 
源代码13 项目: ignite   文件: GridTopic.java
/** {@inheritDoc} */
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    topic = fromOrdinal(in.readByte());
    id1 = U.readIgniteUuid(in);
    id2 = in.readLong();
}
 
源代码14 项目: spliceengine   文件: OffsetFunction.java
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    super.readExternal(in);
    offset = in.readLong();
    limit = in.readLong();
}
 
源代码15 项目: unitime   文件: XSection.java
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
	iUniqueId = in.readLong();
	iName = (String)in.readObject();
	
	int nrNames = in.readInt();
	iNameByCourse.clear();
	for (int i = 0; i < nrNames; i++)
		iNameByCourse.put(in.readLong(), (String)in.readObject());
	
	iSubpartId = in.readLong();
	iParentId = in.readLong();
	if (iParentId < 0) iParentId = null;
	iLimit = in.readInt();
	iNote = (String)in.readObject();
	iTime = (in.readBoolean() ? new XTime(in) : null);
	
	int nrRooms = in.readInt();
	iRooms.clear();
	for (int i = 0; i < nrRooms; i++)
		iRooms.add(new XRoom(in));
	
	int nrInstructors = in.readInt();
	iInstructors.clear();
	for (int i = 0; i < nrInstructors; i++)
		iInstructors.add(new XInstructor(in));
	
	iAllowOverlap = in.readBoolean();
	iInstructionalType = (String)in.readObject();
	iSubpartName = (String)in.readObject();
	
	iExternalId = (String)in.readObject();
	int nrExtIds = in.readInt();
	iExternalIdByCourse.clear();
	for (int i = 0; i < nrExtIds; i++)
		iExternalIdByCourse.put(in.readLong(), (String)in.readObject());
	iEnabledForScheduling = in.readBoolean();
	iCancelled = in.readBoolean();
	iOnline = in.readBoolean();
	
	int nrCreditsByCourse = in.readInt();
	if (nrCreditsByCourse > 0) {
		iCreditByCourse = new HashMap<Long, Float>();
		for (int i = 0; i < nrExtIds; i++)
			iCreditByCourse.put(in.readLong(), in.readFloat());
	} else {
		iCreditByCourse = null;
	}
}
 
源代码16 项目: gemfirexd-oss   文件: Heap.java
/**
    * Restore the in-memory representation from the stream.
    * <p>
    *
    * @exception ClassNotFoundException Thrown if the stored representation 
    *                                   is serialized and a class named in 
    *                                   the stream could not be found.
    *
    * @see java.io.Externalizable#readExternal
    **/
private final void localReadExternal(ObjectInput in)
	throws IOException, ClassNotFoundException
{

       // read the format id of this conglomerate.
       conglom_format_id = FormatIdUtil.readFormatIdInteger(in);

	int segmentid = in.readInt();
       long containerid = in.readLong();

	id = new ContainerKey(segmentid, containerid);

       // read the number of columns in the heap.
       int num_columns = in.readInt();

       // read the array of format ids.
       format_ids = ConglomerateUtil.readFormatIdArray(num_columns, in);

       // In memory maintain a collation id per column in the template.
       collation_ids = new int[format_ids.length];

       // initialize all the entries to COLLATION_TYPE_UCS_BASIC, 
       // and then reset as necessary.  For version ACCESS_HEAP_V2_ID,
       // this is the default and no resetting is necessary.
       for (int i = 0; i < format_ids.length; i++)
           collation_ids[i] = StringDataValue.COLLATION_TYPE_UCS_BASIC;

	if (conglom_format_id == StoredFormatIds.ACCESS_HEAP_V3_ID)
       {
           // current format id, read collation info from disk

           ConglomerateUtil.readCollationIdArray(collation_ids, in);
       }
       else if (conglom_format_id != StoredFormatIds.ACCESS_HEAP_V2_ID)
       {
           // Currently only V2 and V3 should be possible in a Derby DB.
           // Actual work for V2 is handled by default code above, so no
           // special work is necessary.

           if (SanityManager.DEBUG)
           {
               SanityManager.THROWASSERT(
                   "Unexpected format id: " + conglom_format_id);
           }
       }
   }
 
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    super.readExternal(in);
    minDev = in.readLong();
    maxDev = in.readLong();
    paramText = (String) in.readObject();
}
 
源代码18 项目: ignite   文件: VisorCacheConfiguration.java
/** {@inheritDoc} */
@Override protected void readExternalData(byte protoVer, ObjectInput in) throws IOException, ClassNotFoundException {
    name = U.readString(in);
    grpName = U.readString(in);
    mode = CacheMode.fromOrdinal(in.readByte());
    atomicityMode = CacheAtomicityMode.fromOrdinal(in.readByte());
    eagerTtl = in.readBoolean();
    writeSynchronizationMode = CacheWriteSynchronizationMode.fromOrdinal(in.readByte());
    invalidate = in.readBoolean();
    maxConcurrentAsyncOps = in.readInt();
    interceptor = U.readString(in);
    dfltLockTimeout = in.readLong();
    affinityCfg = (VisorCacheAffinityConfiguration)in.readObject();
    rebalanceCfg = (VisorCacheRebalanceConfiguration)in.readObject();
    evictCfg = (VisorCacheEvictionConfiguration)in.readObject();
    nearCfg = (VisorCacheNearConfiguration)in.readObject();
    storeCfg = (VisorCacheStoreConfiguration)in.readObject();
    qryEntities = U.readList(in);
    jdbcTypes = U.readList(in);
    statisticsEnabled = in.readBoolean();
    mgmtEnabled = in.readBoolean();
    ldrFactory = U.readString(in);
    writerFactory = U.readString(in);
    expiryPlcFactory = U.readString(in);
    qryCfg = (VisorQueryConfiguration)in.readObject();
    sys = in.readBoolean();
    storeKeepBinary = in.readBoolean();
    onheapCache = in.readBoolean();
    partLossPlc = PartitionLossPolicy.fromOrdinal(in.readByte());
    qryParallelism = in.readInt();
    cpOnRead = in.readBoolean();
    evictFilter = U.readString(in);
    lsnrConfigurations = U.readString(in);
    loadPrevVal = in.readBoolean();
    dataRegName = U.readString(in);
    sqlIdxMaxInlineSize = in.readInt();
    nodeFilter = U.readString(in);
    qryDetailMetricsSz = in.readInt();
    readFromBackup = in.readBoolean();
    tmLookupClsName = U.readString(in);
    topValidator = U.readString(in);
    dynamicDeploymentId = U.readIgniteUuid(in);

    if (protoVer > V1) {
        diskPageCompression = DiskPageCompression.fromOrdinal(in.readByte());
        diskPageCompressionLevel = (Integer) in.readObject();
    }
}
 
源代码19 项目: cacheonix-core   文件: UUID.java
/**
 * The object implements the readExternal method to restore its contents by calling the methods of DataInput for
 * primitive types and readObject for objects, strings and arrays.  The readExternal method must read the values in
 * the same sequence and with the same types as were written by writeExternal.
 *
 * @param in the stream to read data from in order to restore the object
 * @throws IOException if I/O errors occur
 */
public void readExternal(final ObjectInput in) throws IOException {

   mostSignificantBits = in.readLong();
   leastSignificantBits = in.readLong();
   hashCode = calculateHashCode(mostSignificantBits, leastSignificantBits);
}
 
源代码20 项目: TencentKona-8   文件: ObjID.java
/**
 * Constructs and returns a new <code>ObjID</code> instance by
 * unmarshalling a binary representation from an
 * <code>ObjectInput</code> instance.
 *
 * <p>Specifically, this method first invokes the given stream's
 * {@link ObjectInput#readLong()} method to read an object number,
 * then it invokes {@link UID#read(DataInput)} with the
 * stream to read an address space identifier, and then it
 * creates and returns a new <code>ObjID</code> instance that
 * contains the object number and address space identifier that
 * were read from the stream.
 *
 * @param   in the <code>ObjectInput</code> instance to read
 * <code>ObjID</code> from
 *
 * @return  unmarshalled <code>ObjID</code> instance
 *
 * @throws  IOException if an I/O error occurs while performing
 * this operation
 */
public static ObjID read(ObjectInput in) throws IOException {
    long num = in.readLong();
    UID space = UID.read(in);
    return new ObjID(num, space);
}