MessageQueue.EnableConnectionCache 속성

정의

연결 캐시가 애플리케이션에 의해 유지 관리될지 여부를 나타내는 값을 가져오거나 설정합니다.

public:
 static property bool EnableConnectionCache { bool get(); void set(bool value); };
[System.ComponentModel.Browsable(false)]
public static bool EnableConnectionCache { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.EnableConnectionCache : bool with get, set
Public Shared Property EnableConnectionCache As Boolean

속성 값

Boolean

연결 캐시를 만들어 사용하면 true이고, 그렇지 않으면 false입니다.

특성

예제

다음 코드 예제에서는 메시지 큐 EnableConnectionCache 의 속성 값을 가져오고 설정합니다.

// Set the MessageQueue.EnableConnectionCache property value.
MessageQueue.EnableConnectionCache = false;

// Display the new value of the MessageQueue.EnableConnectionCache
// property.
Console.WriteLine("MessageQueue.EnableConnectionCache: {0}",
    MessageQueue.EnableConnectionCache);

설명

연결 캐시는 큐에 대한 읽기 또는 쓰기 핸들을 포함하는 구조체에 대한 참조 목록입니다. 이 MessageQueue true경우 EnableConnectionCache 새 핸들을 열지 않고 호출PeekSend(Object)Receive때마다 캐시에서 핸들을 대여합니다. 이렇게 하면 성능이 향상될 수 있습니다. 또한 연결 캐시를 사용하면 네트워크 토폴로지의 MessageQueue 변경 내용이 차단됩니다.

연결 캐시가 가득 찼 MessageQueue 을 때 큐에 대한 새 연결을 만드는 경우 가장 최근에 액세스한 구조를 새 연결로 덮어씁니다. 예를 들어 이전 읽기 및 쓰기 핸들이 더 이상 유효하지 않도록 작업 중인 큐의 형식 이름이 변경된 경우를 호출 ClearConnectionCache하여 캐시를 완전히 지울 수 있습니다.

다음 표에서는 이 속성을 다양한 작업 그룹 모드에서 사용할 수 있는지 여부를 보여 줍니다.

작업 그룹 모드 사용 가능
수집 Yes
로컬 컴퓨터 및 직접 형식 이름 Yes
원격 컴퓨터 Yes
원격 컴퓨터 및 직접 형식 이름 Yes

적용 대상

추가 정보