This documentation is archived and is not being maintained.

LogPolicy Class

Represents the policy associated with a LogStore.

System::Object
  System.IO.Log::LogPolicy

Namespace:  System.IO.Log
Assembly:  System.IO.Log (in System.IO.Log.dll)

public ref class LogPolicy sealed

The LogPolicy type exposes the following members.

  NameDescription
Public propertyAutoGrowGets or sets a value indicating whether the LogStore can grow automatically.
Public propertyAutoShrinkPercentageGets or sets the percentage of free space the LogStore can shrink.
Public propertyGrowthRateGets or sets the rate of automatic growth of the LogStore.
Public propertyMaximumExtentCountGets or sets the maximum number of LogExtent instances the LogStore can contain.
Public propertyMinimumExtentCountGets or sets the minimum number of LogExtent instances the LogStore can contain.
Public propertyNewExtentPrefixGets or sets the prefix string for automatically created extents.
Public propertyNextExtentSuffixGets or sets the suffix number for new extents.
Public propertyPinnedTailThresholdGets or sets the amount of space that the TailPinned event requires for advancing the base of the log.
Top

  NameDescription
Public methodCommitSets this policy as the current policy for the LogStore.
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodRefreshReads the current policy for the LogStore, discarding any changes that may have been made.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

A policy is a set of rules to be followed by a LogStore instance and its clients. A LogPolicy instance is used to examine and modify the policy associated with a specific LogStore. A policy can describe the minimum and maximum allowable log sizes, or how the LogStore instance is allowed to grow. In addition, you can also control whether a LogStore instance can be archived.

After changing any of the properties, you should use the Commit method to ensure that the changes are applied to the LogStore. You can call the Refresh method to discard changes or to get the most current policy.

This example shows how to use the LogPolicy class to set policy for a log record sequence.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: