OutputBuffers outputBuffers,
DataSize maxBufferSize,
int initialPages,
ScheduledExecutorService stateNotificationExecutor)
{
this.taskStateMachine = new TaskStateMachine(checkNotNull(taskId, "taskId is null"), checkNotNull(stateNotificationExecutor, "stateNotificationExecutor is null"));
this.taskContext = new TaskContext(taskStateMachine, stateNotificationExecutor, session, new DataSize(256, MEGABYTE), new DataSize(1, MEGABYTE), true);
this.location = checkNotNull(location, "location is null");
this.sharedBuffer = new SharedBuffer(taskId, stateNotificationExecutor, checkNotNull(maxBufferSize, "maxBufferSize is null"));