/// <summary> /// Writes this instance to the specified writer. /// </summary> internal void Write(IBinaryRawWriter writer) { var ipFinder = IpFinder; if (ipFinder != null) { writer.WriteBoolean(true); var finder = ipFinder as TcpDiscoveryIpFinderBase; if (finder == null) { throw new InvalidOperationException("Unsupported IP finder: " + ipFinder.GetType()); } finder.Write(writer); } else { writer.WriteBoolean(false); } writer.WriteLong((long)SocketTimeout.TotalMilliseconds); writer.WriteLong((long)AckTimeout.TotalMilliseconds); writer.WriteLong((long)MaxAckTimeout.TotalMilliseconds); writer.WriteLong((long)NetworkTimeout.TotalMilliseconds); writer.WriteLong((long)JoinTimeout.TotalMilliseconds); }
/// <summary> /// Writes this instance to the specified writer. /// </summary> internal void Write(IBinaryRawWriter writer) { writer.WriteInt(AckSendThreshold); writer.WriteInt(ConnectionsPerNode); writer.WriteLong((long)ConnectTimeout.TotalMilliseconds); writer.WriteBoolean(DirectBuffer); writer.WriteBoolean(DirectSendBuffer); writer.WriteBoolean(FilterReachableAddresses); writer.WriteLong((long)IdleConnectionTimeout.TotalMilliseconds); writer.WriteString(LocalAddress); writer.WriteInt(LocalPort); writer.WriteInt(LocalPortRange); writer.WriteLong((long)MaxConnectTimeout.TotalMilliseconds); writer.WriteInt(MessageQueueLimit); writer.WriteInt(ReconnectCount); writer.WriteInt(SelectorsCount); writer.WriteLong(SelectorSpins); writer.WriteInt(-1); writer.WriteInt(SlowClientQueueLimit); writer.WriteInt(SocketReceiveBufferSize); writer.WriteInt(SocketSendBufferSize); writer.WriteLong(SocketWriteTimeout); writer.WriteBoolean(TcpNoDelay); writer.WriteInt(UnacknowledgedMessagesBufferSize); writer.WriteBoolean(UsePairedConnections); }
/// <summary> /// Writes this instance to a writer. /// </summary> /// <param name="writer">The writer.</param> internal void Write(IBinaryRawWriter writer) { Debug.Assert(writer != null); writer.WriteLong(SystemCacheInitialSize); writer.WriteLong(SystemCacheMaxSize); writer.WriteInt(PageSize); writer.WriteInt(ConcurrencyLevel); writer.WriteString(DefaultMemoryPolicyName); if (MemoryPolicies != null) { writer.WriteInt(MemoryPolicies.Count); foreach (var policy in MemoryPolicies) { if (policy == null) { throw new IgniteException("MemoryConfiguration.MemoryPolicies must not contain null items."); } policy.Write(writer); } } else { writer.WriteInt(0); } }
/// <summary> /// Writes this instance to the specified writer. /// </summary> /// <param name="writer">The writer.</param> internal void Write(IBinaryRawWriter writer) { Debug.Assert(writer != null); writer.WriteLong(InitialSize); writer.WriteLong(MaxSize); }
/// <summary> /// Writes this instance to the specified writer. /// </summary> /// <param name="writer">The writer.</param> internal void Write(IBinaryRawWriter writer) { Debug.Assert(writer != null); writer.WriteString(StoragePath); writer.WriteTimeSpanAsLong(CheckpointFrequency); writer.WriteInt(CheckpointThreads); writer.WriteTimeSpanAsLong(LockWaitTime); writer.WriteInt(WalHistorySize); writer.WriteInt(WalSegments); writer.WriteInt(WalSegmentSize); writer.WriteString(WalPath); writer.WriteString(WalArchivePath); writer.WriteInt((int)WalMode); writer.WriteInt(WalThreadLocalBufferSize); writer.WriteTimeSpanAsLong(WalFlushFrequency); writer.WriteLong(WalFsyncDelayNanos); writer.WriteInt(WalRecordIteratorBufferSize); writer.WriteBoolean(AlwaysWriteFullPages); writer.WriteBoolean(MetricsEnabled); writer.WriteInt(MetricsSubIntervalCount); writer.WriteTimeSpanAsLong(MetricsRateTimeInterval); writer.WriteInt((int)CheckpointWriteOrder); writer.WriteBoolean(WriteThrottlingEnabled); writer.WriteLong(SystemRegionInitialSize); writer.WriteLong(SystemRegionMaxSize); writer.WriteInt(PageSize); writer.WriteInt(ConcurrencyLevel); if (DataRegionConfigurations != null) { writer.WriteInt(DataRegionConfigurations.Count); foreach (var region in DataRegionConfigurations) { if (region == null) { throw new IgniteException( "DataStorageConfiguration.DataRegionConfigurations must not contain null items."); } region.Write(writer); } } else { writer.WriteInt(0); } if (DefaultDataRegionConfiguration != null) { writer.WriteBoolean(true); DefaultDataRegionConfiguration.Write(writer); } else { writer.WriteBoolean(false); } }
/// <summary> /// Writes this instance to the specified writer. /// </summary> /// <param name="writer">The writer.</param> internal void Write(IBinaryRawWriter writer) { Debug.Assert(writer != null); writer.WriteString(PersistentStorePath); writer.WriteTimeSpanAsLong(CheckpointingFrequency); writer.WriteLong(CheckpointingPageBufferSize); writer.WriteInt(CheckpointingThreads); writer.WriteTimeSpanAsLong(LockWaitTime); writer.WriteInt(WalHistorySize); writer.WriteInt(WalSegments); writer.WriteInt(WalSegmentSize); writer.WriteString(WalStorePath); writer.WriteString(WalArchivePath); writer.WriteInt((int)WalMode); writer.WriteInt(TlbSize); writer.WriteTimeSpanAsLong(WalFlushFrequency); writer.WriteLong(WalFsyncDelayNanos); writer.WriteInt(WalRecordIteratorBufferSize); writer.WriteBoolean(AlwaysWriteFullPages); writer.WriteBoolean(MetricsEnabled); writer.WriteInt(SubIntervals); writer.WriteTimeSpanAsLong(RateTimeInterval); writer.WriteInt((int)CheckpointWriteOrder); }
/// <summary> /// Writes the policy. /// </summary> public static void WritePolicy(IBinaryRawWriter writer, IExpiryPolicy plc) { Debug.Assert(plc != null); Debug.Assert(writer != null); writer.WriteLong(ConvertDuration(plc.GetExpiryForCreate())); writer.WriteLong(ConvertDuration(plc.GetExpiryForUpdate())); writer.WriteLong(ConvertDuration(plc.GetExpiryForAccess())); }
/// <summary> /// Writes this instance to a writer. /// </summary> internal void Write(IBinaryRawWriter writer) { writer.WriteString(Name); writer.WriteLong(InitialSize); writer.WriteLong(MaxSize); writer.WriteString(SwapFilePath); writer.WriteInt((int)PageEvictionMode); writer.WriteDouble(EvictionThreshold); writer.WriteInt(EmptyPagesPoolSize); }
/// <summary> /// Serializes content to the writer /// </summary> public override void InternalToBinary(IBinaryRawWriter writer) { base.InternalToBinary(writer); VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteLong(StartDate.ToBinary()); writer.WriteLong(EndDate.ToBinary()); writer.WriteLong(Interval.Ticks); }
/// <summary> /// Writes this instance to a writer. /// </summary> internal void Write(IBinaryRawWriter writer) { writer.WriteString(Name); writer.WriteLong(InitialSize); writer.WriteLong(MaxSize); writer.WriteString(SwapFilePath); writer.WriteInt((int)PageEvictionMode); writer.WriteDouble(EvictionThreshold); writer.WriteInt(EmptyPagesPoolSize); writer.WriteBoolean(MetricsEnabled); writer.WriteInt(SubIntervals); writer.WriteTimeSpanAsLong(RateTimeInterval); }
/// <summary> /// Writes this instance. /// </summary> internal void Write(IBinaryRawWriter writer) { writer.WriteLong(MaxEventCount); if (ExpirationTimeout == TimeSpan.MaxValue || ExpirationTimeout < TimeSpan.Zero) { writer.WriteLong(long.MaxValue); } else { writer.WriteLong((long)ExpirationTimeout.TotalMilliseconds); } }
/// <summary> /// Writes this instane to the specified writer. /// </summary> /// <param name="writer">The writer.</param> internal void Write(IBinaryRawWriter writer) { writer.WriteInt((int)AtomicityMode); writer.WriteInt((int)AtomicWriteOrderMode); writer.WriteInt(Backups); writer.WriteInt((int)CacheMode); writer.WriteBoolean(CopyOnRead); writer.WriteBoolean(EagerTtl); writer.WriteBoolean(EnableSwap); writer.WriteBoolean(EvictSynchronized); writer.WriteInt(EvictSynchronizedConcurrencyLevel); writer.WriteInt(EvictSynchronizedKeyBufferSize); writer.WriteLong((long)EvictSynchronizedTimeout.TotalMilliseconds); writer.WriteBoolean(Invalidate); writer.WriteBoolean(KeepBinaryInStore); writer.WriteBoolean(LoadPreviousValue); writer.WriteLong((long)LockTimeout.TotalMilliseconds); writer.WriteLong((long)LongQueryWarningTimeout.TotalMilliseconds); writer.WriteInt(MaxConcurrentAsyncOperations); writer.WriteFloat(MaxEvictionOverflowRatio); writer.WriteInt((int)MemoryMode); writer.WriteString(Name); writer.WriteLong(OffHeapMaxMemory); writer.WriteBoolean(ReadFromBackup); writer.WriteInt(RebalanceBatchSize); writer.WriteLong((long)RebalanceDelay.TotalMilliseconds); writer.WriteInt((int)RebalanceMode); writer.WriteLong((long)RebalanceThrottle.TotalMilliseconds); writer.WriteLong((long)RebalanceTimeout.TotalMilliseconds); writer.WriteBoolean(SqlEscapeAll); writer.WriteInt(SqlOnheapRowCacheSize); writer.WriteInt(StartSize); writer.WriteInt(WriteBehindBatchSize); writer.WriteBoolean(WriteBehindEnabled); writer.WriteLong((long)WriteBehindFlushFrequency.TotalMilliseconds); writer.WriteInt(WriteBehindFlushSize); writer.WriteInt(WriteBehindFlushThreadCount); writer.WriteInt((int)WriteSynchronizationMode); writer.WriteObject(CacheStoreFactory); if (QueryEntities != null) { writer.WriteInt(QueryEntities.Count); foreach (var entity in QueryEntities) { if (entity == null) { throw new InvalidOperationException("Invalid cache configuration: QueryEntity can't be null."); } entity.Write(writer); } } else { writer.WriteInt(0); } }
/// <summary> /// Writes this instance to a writer. /// </summary> internal void Write(IBinaryRawWriter writer) { writer.WriteString(Name); writer.WriteBoolean(PersistenceEnabled); writer.WriteLong(InitialSize); writer.WriteLong(MaxSize); writer.WriteString(SwapPath); writer.WriteInt((int)PageEvictionMode); writer.WriteDouble(EvictionThreshold); writer.WriteInt(EmptyPagesPoolSize); writer.WriteBoolean(MetricsEnabled); writer.WriteInt(MetricsSubIntervalCount); writer.WriteTimeSpanAsLong(MetricsRateTimeInterval); writer.WriteLong(CheckpointPageBufferSize); }
/// <summary> /// Serializes content of the cell to the writer /// </summary> public void ToBinary(IBinaryRawWriter writer) { writer.WriteInt(StartCellPassIdx); writer.WriteInt(EndCellPassIdx); writer.WriteShort(MachineID); writer.WriteLong(LastLayerPassTime.ToBinary()); writer.WriteShort(CCV); writer.WriteLong(CCV_Time.ToBinary()); writer.WriteShort(CCV_MachineID); writer.WriteFloat(CCV_Elev); writer.WriteShort(TargetCCV); writer.WriteInt(CCV_CellPassIdx); writer.WriteShort(MDP); writer.WriteLong(MDP_Time.ToBinary()); writer.WriteShort(MDP_MachineID); writer.WriteFloat(MDP_Elev); writer.WriteShort(TargetMDP); writer.WriteByte(CCA); writer.WriteLong(CCA_Time.ToBinary()); writer.WriteShort(CCA_MachineID); writer.WriteFloat(CCA_Elev); writer.WriteShort(TargetCCA); writer.WriteByte(RadioLatency); writer.WriteInt(TargetPassCount); writer.WriteFloat(Thickness); writer.WriteFloat(TargetThickness); writer.WriteFloat(Height); writer.WriteShort(RMV); writer.WriteInt(Frequency); writer.WriteInt(Amplitude); writer.WriteInt(MaterialTemperature); writer.WriteLong(MaterialTemperature_Time.ToBinary()); writer.WriteShort(MaterialTemperature_MachineID); writer.WriteFloat(MaterialTemperature_Elev); writer.WriteInt((int)Status); writer.WriteFloat(MaxThickness); writer.WriteInt(FilteredPassCount); writer.WriteInt(FilteredHalfPassCount); writer.WriteFloat(MinimumPassHeight); writer.WriteFloat(MaximumPassHeight); writer.WriteFloat(FirstPassHeight); writer.WriteFloat(LastPassHeight); }
public override void InternalToBinary(IBinaryRawWriter writer) { VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteGuid(ID); writer.WriteLong(CreationDate.ToBinary()); writer.WriteLong(LastModifiedDate.ToBinary()); writer.WriteBoolean(SiteModelExtent != null); SiteModelExtent?.ToBinary(writer); writer.WriteInt(MachineCount); writer.WriteInt(DesignCount); writer.WriteInt(SurveyedSurfaceCount); writer.WriteInt(AlignmentCount); }
/// <summary> /// Serializes content to the writer /// </summary> public override void InternalToBinary(IBinaryRawWriter writer) { VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteByte((byte)Result); writer.WriteLong(NumRemovedElements); }
public void ToBinary(IBinaryRawWriter writer) { VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteGuid(ProjectUID); writer.WriteLong(InsertUTCTicks); }
/// <summary> /// Writes this instance. /// </summary> internal void Write(IBinaryRawWriter writer) { writer.WriteBoolean(TryStop); if (Timeout == TimeSpan.MaxValue) { writer.WriteLong(long.MaxValue); } else if (Timeout < TimeSpan.Zero) { writer.WriteLong(0); } else { writer.WriteLong((long)Timeout.TotalMilliseconds); } }
/// <summary> /// Serializes content to the writer /// </summary> public override void InternalToBinary(IBinaryRawWriter writer) { VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteLong(Date.ToBinary()); writer.WriteBoolean(Volume != null); Volume?.ToBinary(writer); }
public override void InternalToBinary(IBinaryRawWriter writer) { VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteGuid(OriginatingIgniteNodeId); writer.WriteGuid(ExternalDescriptor); writer.WriteLong(RequestEmissionDateUtc.ToBinary()); }
public override void InternalToBinary(IBinaryRawWriter writer) { base.InternalToBinary(writer); VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteBoolean(Undo); writer.WriteGuid(ProjectID); writer.WriteGuid(AssetID); writer.WriteLong(StartUTC.ToBinary()); writer.WriteLong(EndUTC.ToBinary()); writer.WriteString(MachineDesignName); writer.WriteBoolean(LayerID.HasValue); if (LayerID.HasValue) { writer.WriteInt(LayerID.Value); } }
/// <summary> /// Writes this object to the given writer. /// </summary> public void WriteBinary(IBinaryRawWriter writer, bool changesOnly) { ((IgniteSessionStateItemCollection)Items).WriteBinary(writer, changesOnly); writer.WriteByteArray(SerializeStaticObjects()); writer.WriteInt(Timeout); writer.WriteGuid(LockNodeId); writer.WriteLong(LockId); writer.WriteTimestamp(LockTime); }
/// <summary> /// Writes the lock info. /// </summary> private void WriteLockInfo(IBinaryRawWriter writer, long lockId, bool writeTime = false) { writer.WriteGuid(Cache.Ignite.GetCluster().GetLocalNode().Id); writer.WriteLong(lockId); if (writeTime) { writer.WriteTimestamp(DateTime.UtcNow); } }
/// <summary> /// Writes the remote query. /// </summary> /// <param name="filter">The filter.</param> /// <param name="timeout">The timeout.</param> /// <param name="types">The types.</param> /// <param name="writer">The writer.</param> private static void WriteRemoteQuery <T>(IEventFilter <T> filter, TimeSpan?timeout, int[] types, IBinaryRawWriter writer) where T : IEvent { writer.WriteObject(filter); writer.WriteLong((long)(timeout == null ? 0 : timeout.Value.TotalMilliseconds)); WriteEventTypes(types, writer); }
public override void InternalToBinary(IBinaryRawWriter writer) { VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteLong(InsertUTC.ToBinary()); writer.WriteByteArray(Content); writer.WriteGuid(ProjectUID); writer.WriteGuid(MachineUid); writer.WriteInt((int)Operation); writer.WriteInt((int)Origin); }
/// <summary> /// Writes this instance to a writer. /// </summary> /// <param name="writer">The writer.</param> /// <param name="srvVer">Server version.</param> internal void Write(IBinaryRawWriter writer, ClientProtocolVersion srvVer) { writer.WriteString(Name); writer.WriteBoolean(PersistenceEnabled); writer.WriteLong(InitialSize); writer.WriteLong(MaxSize); writer.WriteString(SwapPath); writer.WriteInt((int)PageEvictionMode); writer.WriteDouble(EvictionThreshold); writer.WriteInt(EmptyPagesPoolSize); writer.WriteBoolean(MetricsEnabled); writer.WriteInt(MetricsSubIntervalCount); writer.WriteTimeSpanAsLong(MetricsRateTimeInterval); writer.WriteLong(CheckpointPageBufferSize); if (srvVer.CompareTo(ClientSocket.Ver130) >= 0) { writer.WriteBoolean(LazyMemoryAllocation); } }
/// <summary> /// Writes the nullable long. /// </summary> public static void WriteLongNullable(this IBinaryRawWriter writer, long?value) { if (value != null) { writer.WriteBoolean(true); writer.WriteLong(value.Value); } else { writer.WriteBoolean(false); } }
public override void InternalToBinary(IBinaryRawWriter writer) { VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteLong(InsertUTC.ToBinary()); writer.WriteString(FileName); writer.WriteByteArray(Content); writer.WriteGuid(ProjectID); writer.WriteGuid(AssetID); writer.WriteBoolean(IsJohnDoe); writer.WriteInt((int)SubmissionFlags); writer.WriteInt((int)OriginSource); }
/// <summary> /// Serializes content to the writer /// </summary> public override void InternalToBinary(IBinaryRawWriter writer) { base.InternalToBinary(writer); VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteGuid(ProjectID); writer.WriteInt((int)VolumeType); writer.WriteBoolean(BaseDesign != null); BaseDesign?.ToBinary(writer); writer.WriteBoolean(TopDesign != null); TopDesign?.ToBinary(writer); WriteFilter(writer, AdditionalSpatialFilter); writer.WriteDouble(CutTolerance); writer.WriteDouble(FillTolerance); writer.WriteLong(StartDate.ToBinary()); writer.WriteLong(EndDate.ToBinary()); writer.WriteLong(Interval.Ticks); }
/// <summary> /// Serialises content to the writer /// </summary> public override void InternalToBinary(IBinaryRawWriter writer) { VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteInt((int)ReturnCode); writer.WriteBoolean(Value.HasValue); if (Value.HasValue) { writer.WriteDouble(Value.Value); } writer.WriteBoolean(TimeStampUTC.HasValue); if (TimeStampUTC.HasValue) { writer.WriteLong(TimeStampUTC.Value.ToBinary()); } }
/// <summary> /// Writes this instance to the specified writer. /// </summary> internal void Write(IBinaryRawWriter writer) { writer.WriteInt(AckSendThreshold); writer.WriteLong((long) ConnectTimeout.TotalMilliseconds); writer.WriteBoolean(DirectBuffer); writer.WriteBoolean(DirectSendBuffer); writer.WriteLong((long) IdleConnectionTimeout.TotalMilliseconds); writer.WriteString(LocalAddress); writer.WriteInt(LocalPort); writer.WriteInt(LocalPortRange); writer.WriteLong((long) MaxConnectTimeout.TotalMilliseconds); writer.WriteInt(MessageQueueLimit); writer.WriteInt(ReconnectCount); writer.WriteInt(SelectorsCount); writer.WriteInt(SlowClientQueueLimit); writer.WriteInt(SocketReceiveBufferSize); writer.WriteInt(SocketSendBufferSize); writer.WriteBoolean(TcpNoDelay); writer.WriteInt(UnacknowledgedMessagesBufferSize); }
/// <summary> /// Writes this instane to the specified writer. /// </summary> /// <param name="writer">The writer.</param> internal void Write(IBinaryRawWriter writer) { writer.WriteInt((int) AtomicityMode); writer.WriteInt((int) AtomicWriteOrderMode); writer.WriteInt(Backups); writer.WriteInt((int) CacheMode); writer.WriteBoolean(CopyOnRead); writer.WriteBoolean(EagerTtl); writer.WriteBoolean(EnableSwap); writer.WriteBoolean(EvictSynchronized); writer.WriteInt(EvictSynchronizedConcurrencyLevel); writer.WriteInt(EvictSynchronizedKeyBufferSize); writer.WriteLong((long) EvictSynchronizedTimeout.TotalMilliseconds); writer.WriteBoolean(Invalidate); writer.WriteBoolean(KeepBinaryInStore); writer.WriteBoolean(LoadPreviousValue); writer.WriteLong((long) LockTimeout.TotalMilliseconds); writer.WriteLong((long) LongQueryWarningTimeout.TotalMilliseconds); writer.WriteInt(MaxConcurrentAsyncOperations); writer.WriteFloat(MaxEvictionOverflowRatio); writer.WriteInt((int) MemoryMode); writer.WriteString(Name); writer.WriteLong(OffHeapMaxMemory); writer.WriteBoolean(ReadFromBackup); writer.WriteInt(RebalanceBatchSize); writer.WriteLong((long) RebalanceDelay.TotalMilliseconds); writer.WriteInt((int) RebalanceMode); writer.WriteLong((long) RebalanceThrottle.TotalMilliseconds); writer.WriteLong((long) RebalanceTimeout.TotalMilliseconds); writer.WriteBoolean(SqlEscapeAll); writer.WriteInt(SqlOnheapRowCacheSize); writer.WriteInt(StartSize); writer.WriteInt(WriteBehindBatchSize); writer.WriteBoolean(WriteBehindEnabled); writer.WriteLong((long) WriteBehindFlushFrequency.TotalMilliseconds); writer.WriteInt(WriteBehindFlushSize); writer.WriteInt(WriteBehindFlushThreadCount); writer.WriteInt((int) WriteSynchronizationMode); writer.WriteObject(CacheStoreFactory); if (QueryEntities != null) { writer.WriteInt(QueryEntities.Count); foreach (var entity in QueryEntities) { if (entity == null) throw new InvalidOperationException("Invalid cache configuration: QueryEntity can't be null."); entity.Write(writer); } } else writer.WriteInt(0); }
/// <summary> /// Writes this instance to the specified writer. /// </summary> internal void Write(IBinaryRawWriter writer) { var ipFinder = IpFinder; if (ipFinder != null) { writer.WriteBoolean(true); var finder = ipFinder as TcpDiscoveryIpFinderBase; if (finder == null) throw new InvalidOperationException("Unsupported IP finder: " + ipFinder.GetType()); finder.Write(writer); } else writer.WriteBoolean(false); writer.WriteLong((long) SocketTimeout.TotalMilliseconds); writer.WriteLong((long) AckTimeout.TotalMilliseconds); writer.WriteLong((long) MaxAckTimeout.TotalMilliseconds); writer.WriteLong((long) NetworkTimeout.TotalMilliseconds); writer.WriteLong((long) JoinTimeout.TotalMilliseconds); }
/// <summary> /// Writes this instance to the specified writer. /// </summary> internal void Write(IBinaryRawWriter writer) { var ipFinder = IpFinder; if (ipFinder != null) { writer.WriteBoolean(true); var finder = ipFinder as TcpDiscoveryIpFinderBase; if (finder == null) throw new InvalidOperationException("Unsupported IP finder: " + ipFinder.GetType()); finder.Write(writer); } else writer.WriteBoolean(false); writer.WriteLong((long) SocketTimeout.TotalMilliseconds); writer.WriteLong((long) AckTimeout.TotalMilliseconds); writer.WriteLong((long) MaxAckTimeout.TotalMilliseconds); writer.WriteLong((long) NetworkTimeout.TotalMilliseconds); writer.WriteLong((long) JoinTimeout.TotalMilliseconds); writer.WriteBoolean(ForceServerMode); writer.WriteBoolean(ClientReconnectDisabled); writer.WriteString(LocalAddress); writer.WriteInt(ReconnectCount); writer.WriteInt(LocalPort); writer.WriteInt(LocalPortRange); writer.WriteInt(MaxMissedHeartbeats); writer.WriteInt(MaxMissedClientHeartbeats); writer.WriteLong((long) StatisticsPrintFrequency.TotalMilliseconds); writer.WriteLong((long) IpFinderCleanFrequency.TotalMilliseconds); writer.WriteInt(ThreadPriority); writer.WriteLong((long) HeartbeatFrequency.TotalMilliseconds); writer.WriteInt(TopologyHistorySize); }
/// <summary> /// Writes to the specified writer. /// </summary> internal static void Write(IBinaryRawWriter writer, IEvictionPolicy policy) { if (policy == null) { writer.WriteByte(0); return; } var p = policy as EvictionPolicyBase; if (p == null) { throw new NotSupportedException( string.Format("Unsupported Eviction Policy: {0}. Only predefined eviction policy types " + "are supported: {1}, {2}", policy.GetType(), typeof (LruEvictionPolicy), typeof (FifoEvictionPolicy))); } writer.WriteByte(p is FifoEvictionPolicy ? (byte) 1 : (byte) 2); writer.WriteInt(p.BatchSize); writer.WriteInt(p.MaxSize); writer.WriteLong(p.MaxMemorySize); }
/// <summary> /// Writes the key. /// </summary> private static void WriteKey(DbCacheKey key, IBinaryRawWriter writer, bool includeNames) { writer.WriteString(key.Key); if (key.EntitySetVersions != null) { writer.WriteInt(key.EntitySetVersions.Count); // Versions should be in the same order, so we can't iterate over the dictionary. foreach (var entitySet in key.EntitySets) { writer.WriteLong(key.EntitySetVersions[entitySet.Name]); if (includeNames) writer.WriteString(entitySet.Name); } } else { writer.WriteInt(-1); } }