Permalink
Browse files

added TP.setTimer()

  • Loading branch information...
Bela Ban
Bela Ban committed Oct 19, 2011
1 parent 5d0246e commit a060140d2252b0333954ffedfd93195707211ee8
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/org/jgroups/protocols/TP.java
@@ -589,6 +589,15 @@ public void setTimerThreadFactory(ThreadFactory factory) {
public TimeScheduler getTimer() {return timer;}
+ /**
+ * Sets a new timer. This should be done before the transport is initialized; be very careful, as replacing a
+ * running timer with tasks in it can wreak havoc !
+ * @param timer
+ */
+ public void setTimer(TimeScheduler timer) {
+ this.timer=timer;
+ }
+
public ThreadFactory getThreadFactory() {
return global_thread_factory;
}

0 comments on commit a060140

Please sign in to comment.