P25 work in progress - final check-in of channel state and activity summary processing of TSBK and PDU messages and event generation.

This commit is contained in:
dennis.sheirer
2014-12-21 14:30:06 +00:00
parent ba053457bd
commit 1d77f28958
36 changed files with 1952 additions and 438 deletions

View File

@@ -38,7 +38,7 @@ public class ThreadPoolManager
{
}
public ScheduledFuture<?> schedule( ThreadType type,
public ScheduledFuture<?> scheduleFixedRate( ThreadType type,
Runnable command,
long period,
TimeUnit unit )
@@ -66,6 +66,25 @@ public class ThreadPoolManager
}
public void scheduleOnce( Runnable command, long delay, TimeUnit unit )
throws RejectedExecutionException
{
if( mExecutor == null )
{
mExecutor = Executors.newScheduledThreadPool( THREAD_POOL_SIZE );
}
if( mTasks.size() <= MAX_TASK_COUNT )
{
mExecutor.schedule( command, delay, unit );
}
else
{
throw new RejectedExecutionException( "Cannot schedule task - at "
+ "max task count [" + mTasks.size() + "]" );
}
}
public void cancel( ScheduledFuture<?> task )
{
task.cancel( true );