01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.objectserver.lockmanager.impl;
05:
06: import com.tc.async.api.Sink;
07: import com.tc.object.tx.WaitInvocation;
08:
09: public class TryLockRequest extends Request {
10: private WaitInvocation timeout;
11:
12: /**
13: * Create a new tryLock request
14: *
15: * @param threadContext the open transaction associated with this request
16: * @param lockLevel the lock level that will be in lock response message to the client
17: * @param lockResponseSink the sink that accepts the lock response events
18: * @param timeout the waiting time for the request to be rejected
19: */
20: public TryLockRequest(ServerThreadContext txn, int lockLevel,
21: Sink lockResponseSink, WaitInvocation timeout) {
22: super (txn, lockLevel, lockResponseSink);
23: this .timeout = timeout;
24: }
25:
26: public WaitInvocation getTimeout() {
27: return timeout;
28: }
29:
30: public String toString() {
31: String str = super.toString();
32: return str;
33: }
34:
35: }
|