Skip to content
Snippets Groups Projects
Commit c09392e8 authored by Nelson Tavares de Sousa's avatar Nelson Tavares de Sousa
Browse files

removed deprecated package

parent b8271c06
No related branches found
No related tags found
No related merge requests found
......@@ -15,8 +15,6 @@
*/
package teetime.framework;
import teetime.framework.idle.IdleStrategy;
import teetime.framework.idle.YieldStrategy;
import teetime.framework.signal.ISignal;
import teetime.framework.signal.TerminatingSignal;
......@@ -26,16 +24,12 @@ final class RunnableConsumerStage extends AbstractRunnableStage {
private final InputPort<?>[] inputPorts;
/**
* Creates a new instance with the {@link YieldStrategy} as default idle strategy.
* Creates a new instance.
*
* @param stage
* to execute within an own thread
*/
public RunnableConsumerStage(final Stage stage) {
this(stage, new YieldStrategy());
}
public RunnableConsumerStage(final Stage stage, final IdleStrategy idleStrategy) {
super(stage);
this.inputPorts = stage.getInputPorts(); // FIXME should getInputPorts() really be defined in Stage?
}
......
/**
* Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package teetime.framework.idle;
/**
*
* @author Christian Wulf
*
* @deprecated since 1.1
*/
@Deprecated
public interface IdleStrategy {
void execute() throws InterruptedException;
}
/**
* Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package teetime.framework.idle;
public final class SleepStrategy implements IdleStrategy {
private final long timeoutInMs;
public SleepStrategy(final long timeoutInMs) {
super();
this.timeoutInMs = timeoutInMs;
}
@Override
public void execute() throws InterruptedException {
Thread.sleep(timeoutInMs);
}
}
/**
* Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package teetime.framework.idle;
/**
* @deprecated since 1.1
*/
@Deprecated
public final class YieldStrategy implements IdleStrategy {
@Override
public void execute() throws InterruptedException {
Thread.yield();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment