01: // You can redistribute this software and/or modify it under the terms of
02: // the Ozone Core License version 1 published by ozone-db.org.
03: //
04: // The original code and portions created by SMB are
05: // Copyright (C) 1997-@year@ by SMB GmbH. All rights reserved.
06: //
07: // $Id: DeadlockThread.java,v 1.1 2001/12/18 10:31:30 per_nyfelt Exp $
08:
09: package org.ozoneDB.core;
10:
11: public class DeadlockThread extends Thread {
12:
13: protected TransactionManager tm;
14:
15: protected long sleepTime;
16:
17: public DeadlockThread(long _sleepTime, TransactionManager _tm) {
18: sleepTime = _sleepTime;
19: tm = _tm;
20: }
21:
22: public void run() {
23: for (;;) {
24: try {
25: sleep(sleepTime);
26: tm.checkDeadlocks();
27: } catch (Exception e) {
28: }
29: }
30: }
31: }
|