Session.Close Method (Boolean, Int32)

Closes the session, and optionally finishes the job for the session and deletes the response messages subject to the specified timeout period.


Namespace: Microsoft.Hpc.Scheduler.Session
Assembly: Microsoft.Hpc.Scheduler.Session (in Microsoft.Hpc.Scheduler.Session.dll)

'Usage
Dim instance As Session
Dim purge As Boolean
Dim timeoutMilliseconds As Integer

instance.Close(purge, timeoutMilliseconds)

public void Close (
	bool purge,
	int timeoutMilliseconds
)
public void Close (
	boolean purge, 
	int timeoutMilliseconds
)
public function Close (
	purge : boolean, 
	timeoutMilliseconds : int
)

Parameters

purge

A Boolean object that specifies whether to finish the job for the session and delete the response messages. True finishes the job for the session and deletes the response messages. False indicates that the method should not finish the job for the session and should not delete the response messages.

timeoutMilliseconds

Specifies the length of time in milliseconds that the method should wait for the job to finish and the response messages to be deleted.

Exception typeCondition
TimeoutException

Specifies that the job for the session did not finish or the response messages were not deleted before the end of the specified time period.

To close the session subject to default timeout period for finishing the job and deleting the response messages of 60,000 milliseconds, use the Close or Close(Boolean) method instead.

When you create a session, you will also start a new job. To close the job and the session, use Close(Boolean)(true). To close the job but keep the durable session active, use Close(Boolean)(false). If you use Close(Boolean)(false) on a durable session, you will still be able to attach to the session after the job completes by using the AttachSession method.

Platform Note: This method was introduced in Windows HPC Server 2008 R2 and is not supported in earlier versions.


No members of this type are thread safe.

Development Platforms

Windows XP, Windows Vista, Windows 7, Windows 8, Windows Server 2003, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012

Target Platforms

Windows XP, Windows Vista, Windows 7, Windows 8, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, with HPC Pack Client Utilities




Build Date:

2013-04-22
Show: