System.Runtime.Remoting.Lifetime.LifetimeServices Class

Assembly: Mscorlib.dll
Namespace: System.Runtime.Remoting.Lifetime
Summary
Controls the .NET remoting lifetime services.
C# Syntax:
public sealed class LifetimeServices
Remarks
Distributed garbage collection is responsible for controlling the lifetimes of server applications, and for deleting when them when their lifetimes have expired. Traditionally, distributed garbage collection uses reference counts and pinging for control. This works well when there are a few clients per object, but does not work well when there are thousands of clients per each object. The lifetime service can assume the function of a traditional distributed garbage collector, and scales well when the number of clients increases.

The lifetime service associates a lease with each remotely activated object. When the lease expires, the object is removed.

See also:
System.Runtime.Remoting.Lifetime Namespace

System.Runtime.Remoting.Lifetime.LifetimeServices Member List:

Public Constructors
ctor #1 Default constructor. This constructor is called by derived class constructors to initialize state in this type.
Public Properties
LeaseManagerPollTime Read-write

Gets or sets the time interval between each activation of the lease manager to clean up expired leases.
LeaseTime Read-write

Gets or sets the initial lease time span for an AppDomain.
RenewOnCallTime Read-write

Gets or sets the amount of time by which the lease is extended every time a call comes in on the server object.
SponsorshipTimeout Read-write

Gets or sets the amount of time the lease manager waits for a sponsor to return with a lease renewal time.
Public Methods
Equals
(inherited from System.Object)
See base class member description: System.Object.Equals

Derived from System.Object, the primary base class for all objects.
GetHashCode
(inherited from System.Object)
See base class member description: System.Object.GetHashCode

Derived from System.Object, the primary base class for all objects.
GetType
(inherited from System.Object)
See base class member description: System.Object.GetType

Derived from System.Object, the primary base class for all objects.
ToString
(inherited from System.Object)
See base class member description: System.Object.ToString

Derived from System.Object, the primary base class for all objects.
Protected Methods
Finalize
(inherited from System.Object)
See base class member description: System.Object.Finalize

Derived from System.Object, the primary base class for all objects.
MemberwiseClone
(inherited from System.Object)
See base class member description: System.Object.MemberwiseClone

Derived from System.Object, the primary base class for all objects.

Hierarchy:


System.Runtime.Remoting.Lifetime.LifetimeServices Member Details

ctor #1
Summary:
Default constructor. This constructor is called by derived class constructors to initialize state in this type.
C# Syntax:
public LifetimeServices();

Return to top


Property: LeaseManagerPollTime (read-write)
Summary
Gets or sets the time interval between each activation of the lease manager to clean up expired leases.
C# Syntax:
public static TimeSpan LeaseManagerPollTime {get; set;}
Remarks
The current property defines the frequency at which the lease manager becomes active to clean up expired leases. For example, if LifetimeServices.LeaseManagerPollTime is set to 100 seconds, the lease list is inspected for cleanups and renewals every 100 seconds.

The default value of the LifetimeServices.LeaseManagerPollTime property is 10 seconds.

.NET Framework Security:
SecurityPermission for configuration of the remoting infrastructure. Associated enumeration: SecurityPermissionFlag.RemotingConfiguration.

Return to top


Property: LeaseTime (read-write)
Summary
Gets or sets the initial lease time span for an AppDomain.
C# Syntax:
public static TimeSpan LeaseTime {get; set;}
Remarks
The default lease time span is 5 minutes.
.NET Framework Security:
SecurityPermission for configuration of the remoting infrastructure. Associated enumeration: SecurityPermissionFlag.RemotingConfiguration.

Return to top


Property: RenewOnCallTime (read-write)
Summary
Gets or sets the amount of time by which the lease is extended every time a call comes in on the server object.
C# Syntax:
public static TimeSpan RenewOnCallTime {get; set;}
Remarks
The default renewal time by which a lifetime lease is extended is 2 minutes.
.NET Framework Security:
SecurityPermission for configuration of the remoting infrastructure. Associated enumeration: SecurityPermissionFlag.RemotingConfiguration.

Return to top


Property: SponsorshipTimeout (read-write)
Summary
Gets or sets the amount of time the lease manager waits for a sponsor to return with a lease renewal time.
C# Syntax:
public static TimeSpan SponsorshipTimeout {get; set;}
Remarks
The default time until a call to a sponsor is timed out is 2 minutes.
.NET Framework Security:
SecurityPermission for configuration of the remoting infrastructure. Associated enumeration: SecurityPermissionFlag.RemotingConfiguration.

Return to top


Method: Equals(
   object obj
)
Inherited
See base class member description: System.Object.Equals
C# Syntax:
public virtual bool Equals(
   object obj
);

For more information on members inherited from System.Object click on the link above.

Return to top


Method: Finalize()
Inherited
See base class member description: System.Object.Finalize
C# Syntax:
~LifetimeServices();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetHashCode()
Inherited
See base class member description: System.Object.GetHashCode
C# Syntax:
public virtual int GetHashCode();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetType()
Inherited
See base class member description: System.Object.GetType
C# Syntax:
public Type GetType();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: MemberwiseClone()
Inherited
See base class member description: System.Object.MemberwiseClone
C# Syntax:
protected object MemberwiseClone();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: ToString()
Inherited
See base class member description: System.Object.ToString
C# Syntax:
public virtual string ToString();

For more information on members inherited from System.Object click on the link above.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.