forked from alibaba/jvm-sandbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request alibaba#61 from alibaba/develop-for-spine
Develop for spine
- Loading branch information
Showing
102 changed files
with
7,384 additions
and
2,476 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
while getopts "sr" ARG | ||
do | ||
case ${ARG} in | ||
s) | ||
OP_SNAPSHOT=1; | ||
shift $((OPTIND-1)) | ||
;; | ||
r) | ||
OP_RELEASE=1; | ||
shift $((OPTIND-1)) | ||
;; | ||
esac | ||
done | ||
|
||
[[ ${OP_SNAPSHOT} ]] && NEW_VERSION=${1}-"SNAPSHOT" | ||
[[ ${OP_RELEASE} ]] && NEW_VERSION=${1} | ||
|
||
echo "set project to new version: ${NEW_VERSION}" | ||
mvn -f ../pom.xml versions:set -DoldVersion=* -DnewVersion=${NEW_VERSION} -DprocessAllModules=true -DallowSnapshots=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
sandbox-api/src/main/java/com/alibaba/jvm/sandbox/api/LoadCompleted.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.alibaba.jvm.sandbox.api; | ||
|
||
/** | ||
* 模块加载完成回调 | ||
* <p> | ||
* 因{@link #loadCompleted()}方法比较常用,所以单独出来成为一个接口, | ||
* 原有方法语意、触发时机保持不变 | ||
* </p> | ||
* | ||
* @author luanjia@taobao.com | ||
* @since {@code sandbox-api:1.0.10} | ||
*/ | ||
public interface LoadCompleted { | ||
|
||
/** | ||
* 模块加载完成,模块完成加载后调用! | ||
* <p> | ||
* 模块完成加载是在模块完成所有资源加载、分配之后的回调,在模块生命中期中有且只会调用一次。 | ||
* 这里抛出异常不会影响模块被加载成功的结果。 | ||
* </p> | ||
* <p> | ||
* 模块加载完成之后,所有的基于模块的操作都可以在这个回调中进行 | ||
* </p> | ||
*/ | ||
void loadCompleted(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
sandbox-api/src/main/java/com/alibaba/jvm/sandbox/api/ProcessController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.alibaba.jvm.sandbox.api; | ||
|
||
import static com.alibaba.jvm.sandbox.api.ProcessControlException.throwReturnImmediately; | ||
|
||
/** | ||
* 流程控制 | ||
* <p> | ||
* 用于控制事件处理器处理事件走向 | ||
* </p> | ||
* <p> | ||
* 之前写的{@link ProcessControlException}进行流程控制,但命名不太规范,所以这里重命名一个类 | ||
* </p> | ||
* | ||
* @author luanjia@taobao.com | ||
* @since {@code sandbox-api:1.0.10} | ||
*/ | ||
public final class ProcessController { | ||
|
||
/** | ||
* 中断当前代码处理流程,并立即返回指定对象 | ||
* | ||
* @param object 返回对象 | ||
* @throws ProcessControlException 抛出立即返回流程控制异常 | ||
*/ | ||
public static void returnImmediately(final Object object) throws ProcessControlException { | ||
throwReturnImmediately(object); | ||
} | ||
|
||
/** | ||
* 中断当前代码处理流程,并抛出指定异常 | ||
* | ||
* @param throwable 指定异常 | ||
* @throws ProcessControlException 抛出立即抛出异常流程控制异常 | ||
*/ | ||
public static void throwsImmediately(final Throwable throwable) throws ProcessControlException { | ||
ProcessControlException.throwThrowsImmediately(throwable); | ||
} | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
sandbox-api/src/main/java/com/alibaba/jvm/sandbox/api/annotation/IncludeBootstrap.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.alibaba.jvm.sandbox.api.annotation; | ||
|
||
import com.alibaba.jvm.sandbox.api.filter.Filter; | ||
|
||
import java.lang.annotation.*; | ||
|
||
/** | ||
* 拥有此标记的{@link Filter}, | ||
* 将能匹配到来自{@code BootstrapClassLoader}所加载的类 | ||
* | ||
* @author luanjia@taobao.com | ||
* @since {@code sandbox-api:1.0.10} | ||
*/ | ||
@Target(ElementType.TYPE) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Inherited | ||
public @interface IncludeBootstrap { | ||
} |
17 changes: 17 additions & 0 deletions
17
sandbox-api/src/main/java/com/alibaba/jvm/sandbox/api/annotation/IncludeSubClasses.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.alibaba.jvm.sandbox.api.annotation; | ||
|
||
import com.alibaba.jvm.sandbox.api.filter.Filter; | ||
|
||
import java.lang.annotation.*; | ||
|
||
/** | ||
* 拥有此标注的{@link Filter}将能匹配到目标类的子类 | ||
* | ||
* @author luanjia@taobao.com | ||
* @since {@code sandbox-api:1.0.10} | ||
*/ | ||
@Target(ElementType.TYPE) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Inherited | ||
public @interface IncludeSubClasses { | ||
} |
Oops, something went wrong.