방법 엿보기
몰래 엿보다()
제거하지 않고 IQueue의 시작 부분에 있는 개체를 반환합니다.
선언
T Peek()
반품
| 타입 | 기술설명 |
|---|---|
| T | IQueue의 시작 부분에 있는 개체 |
예
다음 코드 샘플은 개체를 제거하지 않고 분산 큐의 시작 부분에서 가져오는 방법을 보여줍니다.
ICache cache = CacheManager.GetCache("demoClusteredCache");
string dataTypeName = "DistributedQueue";
IDistributedQueue<Product> queue = cache.DataTypeManager.GetQueue<Product>(dataTypeName);
Product product = queue.Peek();