Skip to content

Commit 90dc033

Browse files
committed
A
a
1 parent 8926b37 commit 90dc033

File tree

192 files changed

+792
-743
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

192 files changed

+792
-743
lines changed

modules/packed-incubator/packed-incubator-cli/src/main/java/app/packed/cli/CliCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
import java.lang.annotation.RetentionPolicy;
2323
import java.lang.annotation.Target;
2424

25-
import app.packed.bean.scanning.BeanIntrospector;
26-
import app.packed.bean.scanning.BeanTrigger.OnAnnotatedMethod;
25+
import app.packed.bean.BeanIntrospector;
26+
import app.packed.bean.BeanTrigger.OnAnnotatedMethod;
2727
import app.packed.namespace.sandbox.NamespaceOperation;
2828

2929
/**

modules/packed-incubator/packed-incubator-cli/src/main/java/app/packed/cli/CliNamespaceHandle.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
import java.util.List;
2121

2222
import app.packed.bean.BeanInstallationException;
23-
import app.packed.bean.scanning.BeanIntrospector;
24-
import app.packed.bean.scanning.BeanIntrospector.OnVariable;
23+
import app.packed.bean.BeanIntrospector;
24+
import app.packed.bean.BeanIntrospector.OnVariable;
2525
import app.packed.component.ComponentRealm;
2626
import app.packed.namespace.NamespaceHandle;
2727
import app.packed.namespace.NamespaceInstaller;

modules/packed-incubator/packed-incubator-cli/src/main/java/app/packed/cli/CliOption.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717

1818
import java.lang.annotation.Annotation;
1919

20-
import app.packed.bean.scanning.BeanIntrospector;
21-
import app.packed.bean.scanning.BeanTrigger;
20+
import app.packed.bean.BeanIntrospector;
21+
import app.packed.bean.BeanTrigger.OnAnnotatedVariable;
2222
import app.packed.namespace.sandbox.NamespaceOperation;
2323

2424
/**
2525
*
2626
*/
2727
@NamespaceOperation
28-
@BeanTrigger.OnAnnotatedVariable(introspector = CliOptionBeanIntrospector.class)
28+
@OnAnnotatedVariable(introspector = CliOptionBeanIntrospector.class)
2929
public @interface CliOption {}
3030

3131
final class CliOptionBeanIntrospector extends BeanIntrospector<CliExtension> {

modules/packed-incubator/packed-incubator-concurrent/src/main/java/app/packed/concurrent/job/JobConfiguration.java renamed to modules/packed-incubator/packed-incubator-concurrent/src/main/java/app/packed/concurrent/JobConfiguration.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package app.packed.concurrent.job;
16+
package app.packed.concurrent;
1717

1818
import app.packed.operation.OperationConfiguration;
1919
import app.packed.operation.OperationHandle;
@@ -26,7 +26,8 @@ public abstract class JobConfiguration extends OperationConfiguration {
2626
/**
2727
* @param handle
2828
*/
29-
JobConfiguration(OperationHandle<?> handle) {
29+
// TODO make package private
30+
protected JobConfiguration(OperationHandle<?> handle) {
3031
super(handle);
3132
}
3233
}

modules/packed-incubator/packed-incubator-concurrent/src/main/java/app/packed/concurrent/job2/JobExtension.java renamed to modules/packed-incubator/packed-incubator-concurrent/src/main/java/app/packed/concurrent/JobExtension.java

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,14 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package app.packed.concurrent.job2;
17-
18-
import java.lang.annotation.Annotation;
19-
import java.time.Duration;
16+
package app.packed.concurrent;
2017

2118
import app.packed.bean.BeanConfiguration;
22-
import app.packed.bean.scanning.BeanIntrospector;
23-
import app.packed.binding.Key;
24-
import app.packed.concurrent.annotations.ScheduleJob;
25-
import app.packed.concurrent.job2.impl.ScheduledOperationHandle;
26-
import app.packed.concurrent.other.SchedulingContext;
2719
import app.packed.extension.ExtensionHandle;
2820
import app.packed.extension.ExtensionPoint;
2921
import app.packed.extension.ExtensionPoint.ExtensionPointHandle;
3022
import app.packed.extension.FrameworkExtension;
31-
import internal.app.packed.concurrent.ScheduleImpl;
3223
import internal.app.packed.concurrent.SchedulingTaskManager;
33-
import internal.app.packed.concurrent.ThreadNamespaceHandle;
3424

3525
/**
3626
* This extension allows for multiple threads within an application.
@@ -83,41 +73,6 @@ BeanConfiguration newSchedulingBean() {
8373
// throw new UnsupportedOperationException();
8474
// }
8575

86-
public static class MyI extends BeanIntrospector<JobExtension> {
87-
88-
@Override
89-
public void onExtensionService(Key<?> key, OnContextService service) {
90-
OnVariableUnwrapped binding = service.binder();
91-
92-
Class<?> hook = key.rawType();
93-
if (hook == SchedulingContext.class) {
94-
binding.bindInvocationArgument(1);
95-
} else {
96-
super.onExtensionService(key, service);
97-
}
98-
}
99-
100-
@Override
101-
public void onAnnotatedMethod(Annotation hook, BeanIntrospector.OnMethod on) {
102-
if (hook instanceof ScheduleJob schedule) {
103-
// Parse the schedule
104-
ScheduleImpl s = new ScheduleImpl(Duration.ofMillis(schedule.withFixedDelay()));
105-
106-
// Find the namespace we are installing the operation into
107-
ThreadNamespaceHandle namespace = null;// main();
108-
109-
// Install the operation
110-
ScheduledOperationHandle h = on.newOperation(ScheduledOperationHandle.SCHEDULING_OPERATION_TEMPLATE).install(namespace,
111-
ScheduledOperationHandle::new);
112-
113-
// Configure the handle
114-
h.s = s;
115-
} else {
116-
super.onAnnotatedMethod(hook, on);
117-
}
118-
}
119-
}
120-
12176
/** {@inheritDoc} */
12277
@Override
12378
protected ExtensionPoint<JobExtension> newExtensionPoint(ExtensionPointHandle usesite) {

modules/packed-incubator/packed-incubator-concurrent/src/main/java/app/packed/concurrent/job2/JobExtensionPoint.java renamed to modules/packed-incubator/packed-incubator-concurrent/src/main/java/app/packed/concurrent/JobExtensionPoint.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
package app.packed.concurrent.job2;
1+
package app.packed.concurrent;
22

3-
import app.packed.concurrent.ScheduledOperationConfiguration;
43
import app.packed.extension.ExtensionPoint;
54

65
public class JobExtensionPoint extends ExtensionPoint<JobExtension> {
@@ -13,9 +12,9 @@ public class JobExtensionPoint extends ExtensionPoint<JobExtension> {
1312
* @param object
1413
* @return
1514
*/
16-
public ScheduledOperationConfiguration schedule(Object object) {
17-
throw new UnsupportedOperationException();
18-
}
15+
// public ScheduledOperationConfiguration schedule(Object object) {
16+
// throw new UnsupportedOperationException();
17+
// }
1918

2019

2120
}

modules/packed-incubator/packed-incubator-concurrent/src/main/java/app/packed/concurrent/job/JobMirror.java renamed to modules/packed-incubator/packed-incubator-concurrent/src/main/java/app/packed/concurrent/JobMirror.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package app.packed.concurrent.job;
16+
package app.packed.concurrent;
1717

1818
import app.packed.operation.OperationHandle;
1919
import app.packed.operation.OperationMirror;
2020

2121
/**
22-
* Like all other mirrors, a job mirror only represents jobs that are defined at build time.
23-
* Jobs that are submitted at runtime can only be tracked through a job tracker.
22+
* Like all other mirrors, a job mirror only represents jobs that are defined at build time. Jobs that are submitted at
23+
* runtime can only be tracked through a job tracker.
2424
*/
2525
public abstract class JobMirror extends OperationMirror {
2626

@@ -29,14 +29,14 @@ public abstract class JobMirror extends OperationMirror {
2929
/**
3030
* @param handle
3131
*/
32-
JobMirror(OperationHandle<?> handle) {
32+
// TODO make package private
33+
protected JobMirror(OperationHandle<?> handle) {
3334
super(handle);
3435
}
3536

36-
3737
/** { @return the thread namespace this daemon is a part of} */
3838
public JobNamespaceMirror namespace() {
3939
throw new UnsupportedOperationException();
40-
// return (JobNamespaceMirror) handle.namespace.mirror();
40+
// return (JobNamespaceMirror) handle.namespace.mirror();
4141
}
4242
}

modules/packed-incubator/packed-incubator-concurrent/src/main/java/app/packed/concurrent/job/JobNamespaceConfiguration.java renamed to modules/packed-incubator/packed-incubator-concurrent/src/main/java/app/packed/concurrent/JobNamespaceConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package app.packed.concurrent.job;
16+
package app.packed.concurrent;
1717

1818
import app.packed.component.ComponentRealm;
1919
import app.packed.extension.BaseExtension;

modules/packed-incubator/packed-incubator-concurrent/src/main/java/app/packed/concurrent/job/JobNamespaceMirror.java renamed to modules/packed-incubator/packed-incubator-concurrent/src/main/java/app/packed/concurrent/JobNamespaceMirror.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package app.packed.concurrent.job;
16+
package app.packed.concurrent;
1717

1818
import java.util.stream.Stream;
1919

2020
import app.packed.component.ComponentRealm;
21+
import app.packed.concurrent.daemon.DaemonJobMirror;
2122
import app.packed.extension.BaseExtension;
2223
import app.packed.namespace.NamespaceHandle;
2324
import app.packed.namespace.NamespaceMirror;
@@ -52,6 +53,7 @@ public Stream<JobMirror> allJobs() {
5253
}
5354

5455
/** {@return a stream of all jobs that have been defined in the namespace} */
56+
@SuppressWarnings("exports")
5557
public Stream<DaemonJobMirror> daemons() {
5658
return jobs().filter(DaemonJobMirror.class::isInstance).map(DaemonJobMirror.class::cast);
5759
}

modules/packed-incubator/packed-incubator-concurrent/src/main/java/app/packed/concurrent/SchedulingContext.java

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)