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


Java ObjectDataInput.readLong方法代码示例

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


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

示例1: readData

import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput in) throws IOException {
	clientId = in.readUTF();
	ip = in.readUTF();
	port = in.readInt();
	isConnected = in.readBoolean();
	currentMessageId = in.readInt();

	if (in.readBoolean()) {
		will = new Message(in);
	}

	cleanSession = in.readBoolean();
	keepAliveSeconds = in.readInt();

	long rawLong = in.readLong();
	createTime = rawLong != Long.MIN_VALUE ? new Date(rawLong) : null;

	rawLong = in.readLong();
	lastIncomingTime = rawLong != Long.MIN_VALUE ? new Date(rawLong) : null;

	disposeLock = ClusterDataFactory.INSTANCE.createLock("Session_disposeLock_" + clientId);
	messageSender = new MessageSender(this);
}
 
开发者ID:anyflow,项目名称:lannister,代码行数:25,代码来源:Session.java

示例2: readData

import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput objectDataInput) throws IOException {
    this.creationTime = objectDataInput.readLong();
    this.lastAccessedTime = objectDataInput.readLong();
    this.maxInactiveInterval = objectDataInput.readInt();
    this.isNew = objectDataInput.readBoolean();
    this.isValid = objectDataInput.readBoolean();
    this.thisAccessedTime = objectDataInput.readLong();
    this.id = objectDataInput.readObject();

    setAttributes(deserializeMap(objectDataInput, true));

    this.notes = deserializeMap(objectDataInput, false);

    if (this.listeners == null) {
        this.listeners = new ArrayList();
    }
}
 
开发者ID:hazelcast,项目名称:hazelcast-tomcat-sessionmanager,代码行数:19,代码来源:HazelcastSession.java

示例3: createSerializer

import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public Serializer createSerializer() {
    return new StreamSerializer<Watermark>() {
        @Override
        public int getTypeId() {
            return SerializerHookConstants.WATERMARK;
        }

        @Override
        public void destroy() {
        }

        @Override
        public void write(ObjectDataOutput out, Watermark object) throws IOException {
            out.writeLong(object.timestamp());
        }

        @Override
        public Watermark read(ObjectDataInput in) throws IOException {
            return new Watermark(in.readLong());
        }
    };
}
 
开发者ID:hazelcast,项目名称:hazelcast-jet,代码行数:24,代码来源:CoreSerializerHooks.java

示例4: createSerializer

import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public Serializer createSerializer() {
    return new StreamSerializer<LongAccumulator>() {
        @Override
        public int getTypeId() {
            return SerializerHookConstants.LONG_ACC;
        }

        @Override
        public void destroy() {

        }

        @Override
        public void write(ObjectDataOutput out, LongAccumulator object) throws IOException {
            out.writeLong(object.get());
        }

        @Override
        public LongAccumulator read(ObjectDataInput in) throws IOException {
            return new LongAccumulator(in.readLong());
        }
    };
}
 
开发者ID:hazelcast,项目名称:hazelcast-jet,代码行数:25,代码来源:AccumulatorSerializerHooks.java

示例5: readInternal

import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
protected void readInternal(ObjectDataInput in) throws IOException {
    super.readInternal(in);

    jobId = in.readLong();
    executionId = in.readLong();
    coordinatorMemberListVersion = in.readInt();
    int count = in.readInt();
    participants = new HashSet<>();
    for (int i = 0; i < count; i++) {
        MemberInfo participant = new MemberInfo();
        participant.readData(in);
        participants.add(participant);
    }

    final Data planBlob = in.readData();
    planSupplier = () -> {
        JetService service = getService();
        ClassLoader cl = service.getClassLoader(jobId);
        return deserializeWithCustomClassLoader(getNodeEngine().getSerializationService(), cl, planBlob);
    };
}
 
开发者ID:hazelcast,项目名称:hazelcast-jet,代码行数:23,代码来源:InitExecutionOperation.java

示例6: readData

import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput in) throws IOException {
    size = in.readInt();
    if (size > starts.length) {
        // round to next power of 2
        @SuppressWarnings("checkstyle:magicnumber")
        int newSize = 1 << (32 - Integer.numberOfLeadingZeros(size - 1));
        starts = new long[newSize];
        ends = new long[newSize];
        accs = (A[]) new Object[newSize];
    }

    for (int i = 0; i < size; i++) {
        starts[i] = in.readLong();
        ends[i] = in.readLong();
        accs[i] = in.readObject();
    }
}
 
开发者ID:hazelcast,项目名称:hazelcast-jet,代码行数:19,代码来源:SessionWindowP.java

示例7: createSerializer

import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public Serializer createSerializer() {
    return new StreamSerializer<SnapshotBarrier>() {
        @Override
        public int getTypeId() {
            return SerializerHookConstants.SNAPSHOT_BARRIER;
        }

        @Override
        public void destroy() {
        }

        @Override
        public void write(ObjectDataOutput out, SnapshotBarrier object) throws IOException {
            out.writeLong(object.snapshotId());
        }

        @Override
        public SnapshotBarrier read(ObjectDataInput in) throws IOException {
            return new SnapshotBarrier(in.readLong());
        }
    };
}
 
开发者ID:hazelcast,项目名称:hazelcast-jet,代码行数:24,代码来源:ExecutionSerializerHooks.java

示例8: readData

import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput in) throws IOException {
	address = in.readUTF();
	partId = in.readInt();
	docCount = in.readInt();
	docCost = in.readLong();
	docInQueue = in.readInt();
	docActive = in.readInt();
	conCost = in.readLong();
	eltCount = in.readInt();
	eltCost = in.readLong();
	idxCount = in.readInt();
	idxCost = in.readLong();
	resCount = in.readInt();
	resCost = in.readLong();
}
 
开发者ID:dsukhoroslov,项目名称:bagri,代码行数:17,代码来源:PartitionStatistics.java

示例9: read

import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public Document read(ObjectDataInput in) throws IOException {
	
	FragmentedDocument xDoc = new FragmentedDocument(
			in.readLong(),
			in.readUTF(),
			in.readUTF(),
			in.readLong(),
			in.readLong(),
			new java.util.Date(in.readLong()),
			in.readUTF(),
			in.readUTF(),
			in.readInt(),
			in.readInt());
	xDoc.setCollections(in.readIntArray());
	xDoc.setFragments(in.readLongArray());
	return xDoc;
}
 
开发者ID:dsukhoroslov,项目名称:bagri,代码行数:19,代码来源:FragmentedDocumentSerializer.java

示例10: readInternal

import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
protected void readInternal(ObjectDataInput in)
        throws IOException {

    super.readInternal(in);
    logicalNodeId = in.readInt();
    address = new Address();
    address.readData(in);

    long epochOffset = in.readLong();
    int maxLogicalNodeCount = in.readInt();
    short backupCount = in.readShort();

    SnowcastEpoch epoch = SnowcastEpoch.byTimestamp(epochOffset);
    definition = new SequencerDefinition(getSequencerName(), epoch, maxLogicalNodeCount, backupCount);
}
 
开发者ID:noctarius,项目名称:snowcast,代码行数:17,代码来源:BackupAttachLogicalNodeOperation.java

示例11: readData

import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput in) throws IOException {
    totalPrice = in.readDouble();
    date = new Date(in.readLong());
    id = in.readLong();
    int count = in.readInt();
    items = new ArrayList<>(count);
    for(int i=0; i<count; i++) {
        BookCartItem cartItem = new BookCartItem();
        cartItem.readData(in);
        items.add(cartItem);
    }
}
 
开发者ID:ivogm,项目名称:bookstore,代码行数:14,代码来源:ShoppingCart.java

示例12: readData

import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(final ObjectDataInput in) throws IOException {
    super.readData(in);
    concurrent = in.readBoolean();
    markerId = in.readUTF();
    multiplicity = in.readInt();
    timeout = in.readLong();
    expiredTimestamp = in.readLong();
}
 
开发者ID:hazelcast,项目名称:hazelcast-hibernate5,代码行数:10,代码来源:ExpiryMarker.java

示例13: readData

import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput in) throws IOException
{
    id = in.readLong();
    topic = in.readUTF();
    type = in.readUTF();
    timestamp = in.readLong();
    payload = in.readByteArray();
    
    doReadData(in);  
}
 
开发者ID:ethlo,项目名称:kfka,代码行数:12,代码来源:KfkaMessage.java

示例14: readData

import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput in) throws IOException {
    super.readData(in);
    concurrent = in.readBoolean();
    markerId = in.readUTF();
    multiplicity = in.readInt();
    timeout = in.readLong();
    expiredTimestamp = in.readLong();
}
 
开发者ID:hazelcast,项目名称:hazelcast-hibernate,代码行数:10,代码来源:ExpiryMarker.java

示例15: readData

import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput in) throws IOException {
    lock = in.readObject();
    newValue = in.readObject();
    newVersion = in.readObject();
    nextMarkerId = in.readUTF();
    timestamp = in.readLong();
}
 
开发者ID:hazelcast,项目名称:hazelcast-hibernate,代码行数:9,代码来源:UpdateEntryProcessor.java


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