Skip to content

Commit

Permalink
Effect -> Type
Browse files Browse the repository at this point in the history
  • Loading branch information
silentbalanceyh committed Jun 4, 2023
1 parent b027c8f commit 60b2473
Show file tree
Hide file tree
Showing 70 changed files with 104 additions and 110 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ public enum HttpStatusCode {
REQUEST_URI_TOO_LONG(414, "Request-URI Too Long"),

/**
* 415 Unsupported Media Effect
* 415 Unsupported Media Type
**/
UNSUPPORTED_MEDIA_TYPE(415, "Unsupported Media Effect"),
UNSUPPORTED_MEDIA_TYPE(415, "Unsupported Media Type"),

/**
* 416 Requested Range Not Satisfiable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private IoStream() {
* @param message The java object that will be converted from.
* @param <T> Target java object that will be converted to.
*
* @return Target java object ( Generic Effect )
* @return Target java object ( Generic Type )
*/
static <T> byte[] to(final T message) {
final ByteArrayOutputStream bytes = new ByteArrayOutputStream();
Expand All @@ -48,7 +48,7 @@ static <T> byte[] to(final T message) {
*
* @param pos The position of reading
* @param buffer The buffer to hold the data from reading.
* @param <T> The converted java object type, Generic Effect
* @param <T> The converted java object type, Generic Type
*
* @return Return to converted java object.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static Vs create(final String identifier, final ConcurrentMap<String, HMe

// ============================ Static Comparing Change ===============================
public static boolean isValue(final Object value, final Class<?> type) {
// Fix Null Pointer Exception for Unknown Effect comparing.
// Fix Null Pointer Exception for Unknown Type comparing.
final VsSame same = VsSame.get(type);
return Objects.isNull(same) ? Objects.nonNull(value) : same.ok(value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ interface HMeta {
Set<String> joins();

/*
* Effect
* Type
*/
ConcurrentMap<String, Class<?>> types();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ interface ARGS {
String MIME_DIRECT = "$$DIRECT$$";
/*
* Flow used here
* IGNORE -> Flow.TYPED ( Extract by Effect )
* IGNORE -> Flow.TYPED ( Extract by Type )
*/
String MIME_IGNORE = "$$IGNORE$$";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* This class is ClusterOptions assist tool
*
* * enabled: Boolean Effect
* * enabled: Boolean Type
* * manager: String class and it will be converted to `ClusterManager`
* * options: JsonObject
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void init(final JsonObject input) {
final String typeFlag = Objects.isNull(toArray[1]) ? "" : toArray[1].trim();
if (Objects.nonNull(toField)) {
/*
* Effect here
* Type here
*/
final Class<?> type = BType.type(typeFlag);
/* mapping type */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.util.concurrent.ConcurrentMap;

/*
* Effect Mapping here
* Type Mapping here
* Definition for type conversation of `DualItem`
*/
class BType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* # Linker data for following
*
* <pre><code>
* 1. System Field Information:
* - createdBy
* - createdAt
Expand All @@ -16,20 +16,19 @@
* - language
* - sigma
* - active
*
* 2. System Secondary Information:
* - key : System Primary Key
* - code : System Code
* - name : System Name
* - type : System Effect
* - type : System Type
* - category : System Category
* - serial : System Number & Serialization
*
* 3. System Linking Information:
* - modelCategory : Model Category
* - modelId : Model Id
* - modelKey : Model Key
* - reference : Reference Id
* </code></pre>
*
* @author <a href="http://www.origin-x.cn">Lang</a>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ public long waitUntil() {
* Fix issue of delay < 1ms, the default should be 1
* Cannot schedule a timer with delay < 1 ms
*
* Effect = ONCE
* Type = ONCE
*/
return 1;
} else {
/*
* Effect != ONCE
* Type != ONCE
*/
final Instant start = Instant.now();
final long delay = ChronoUnit.MILLIS.between(start, end);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private static <T> void verifyItem(final T input, final JsonObject rule) throws
reference.flumen(data, rule);
// EmType
reference = CC_INSURER.pick(TypedInsurer::new, "A-EmType");
// Fn.po?lThread(POOL_INSURER, TypedInsurer::new, "A-Effect");
// Fn.po?lThread(POOL_INSURER, TypedInsurer::new, "A-Type");
reference.flumen(data, rule);
// Forbidden
reference = CC_INSURER.pick(ForbiddenInsurer::new, "A-Forbidden");
Expand All @@ -119,8 +119,8 @@ private static <T> void verifyItem(final T input, final JsonObject rule) throws
// Fn.po?lThread(POOL_INSURER, RequiredInsurer::new, "J-Required");
reference.flumen(data, rule);
// EmType
reference = CC_INSURER.pick(TypedInsurer::new, "J-Effect");
// Fn.po?lThread(POOL_INSURER, TypedInsurer::new, "J-Effect");
reference = CC_INSURER.pick(TypedInsurer::new, "J-Type");
// Fn.po?lThread(POOL_INSURER, TypedInsurer::new, "J-Type");
reference.flumen(data, rule);
// Forbidden
reference = CC_INSURER.pick(ForbiddenInsurer::new, "J-Forbidden");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@
* Pojo metadata container
* Meta of Java Object
* Here are definition for HAtom upgrade.
*
* The Yaml Data Structure is as following:
*
* // <pre><code class="yaml">
* type: # POJO Effect of Jooq Generated
* type: # POJO Type of Jooq Generated
* mapping: # Mapping from entity -> field
* pojoField: jsonField
* // </code></pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ static JsonObject output(final KCatena catena) {
* "code": "xxx",
* "mapping": {},
*
* "dmType": "Dm Effect",
* "dmType": "Dm Type",
* "dmComponent": "HDm Interface"
* "dmCondition": {},
* "dmConfig": {},
*
* "uiType": "Ui Effect",
* "uiType": "Ui Type",
* "uiComponent": "HUi Interface",
* "uiCondition": {},
* "uiConfig": {},
Expand Down
4 changes: 2 additions & 2 deletions vertx-gaia/vertx-co/src/main/java/io/vertx/up/util/Value.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private static Object aiValue(final Object input, final Class<?> type,
}

/*
* Json to Effect
* Json to Type
*/
@SuppressWarnings("all")
static Object aiJValue(final Object input, final Class<?> type) {
Expand All @@ -91,7 +91,7 @@ static Object aiJValue(final Object input, final Class<?> type) {
}

/*
* Java to Effect
* Java to Type
*/
@SuppressWarnings("all")
static Object aiValue(final Object input, final Class<?> type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import java.util.function.Function;

/**
* Effect Validation
* Type Validation
*/
public class TypedInsurer extends AbstractInsurer {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public interface CMessage {
String dataKey();

/*
* Data Effect
* Data Type
*/
<T> Class<T> dataType();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.util.Objects;

/*
* Channel for Effect
* Channel for Type
* 1) Object -> UnifiedClause
* 2) String -> StringClause
* 3) Boolean -> BooleanClause
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static <T> T get(final JsonObject data) {
}

/*
* Extract Data by Effect
* Extract Data by Type
*/
static <T> T get(final JsonObject data, final Class<?> clazz) {
T reference = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class JqAnalyzer {
* fieldMap
* zSigma -> Field ( Jooq )
* typeMap
* sigma -> Effect
* sigma -> Type
*/
private transient ConcurrentMap<String, Field> fieldMap = new ConcurrentHashMap<>();
private transient ConcurrentMap<String, Class<?>> typeMap = new ConcurrentHashMap<>();
Expand All @@ -62,7 +62,7 @@ private JqAnalyzer(final JooqDsl dsl) {
this.entityCls = typeCls;

final java.lang.reflect.Field[] fields = Ut.fields(typeCls);
// Analyze Effect and definition sequence, columns hitted.
// Analyze Type and definition sequence, columns hitted.
final Field[] columns = this.table.fields();

// Mapping building
Expand Down Expand Up @@ -293,10 +293,10 @@ public Field column(final String field) {
JooqFieldMissingException.class, UxJooq.class, field, this.entityCls);
LOGGER.debug(INFO.JOOQ_FIELD, field, columnField);
/*
* Old code for field construct, following code will caurse Effect/DataType missing
* Old code for field construct, following code will caurse Type/DataType missing
* DSL.field(DSL.name(targetField));
* 1) Extract from tableFields first
* 2) Extract by construct ( Effect / DataType ) will missing
* 2) Extract by construct ( Type / DataType ) will missing
*/
Field found;
if (field.equals(columnField)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void init(final Class<?> clazz, final VertxDAO dao) {
@Around(value = "execution(* io.vertx.up.uca.jooq.UxJooq.existById(..)) && args(id)", argNames = "id")
public Boolean existById(final ProceedingJoinPoint point, final Object id) throws Throwable {
/*
* Returned Effect checked only
* Returned Type checked only
*/
final CMessage message = this.messageKey(id, point);
return this.existSync(message, point);
Expand All @@ -52,7 +52,7 @@ public Boolean existById(final ProceedingJoinPoint point, final Object id) throw
@Around(value = "execution(* io.vertx.up.uca.jooq.UxJooq.existByIdAsync(..)) && args(id)", argNames = "id")
public Future<Boolean> existByIdAsync(final ProceedingJoinPoint point, final Object id) throws Throwable {
/*
* Returned Effect checked only
* Returned Type checked only
*/
final CMessage message = this.messageKey(id, point);
return this.existAsync(message, point);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public <T> T fetchAsync(final ProceedingJoinPoint point) throws Throwable {
@Around(value = "execution(* io.vertx.up.uca.jooq.UxJooq.fetchById*(..)) && args(id)", argNames = "id")
public <T> T fetchById(final ProceedingJoinPoint point, final Object id) throws Throwable {
/*
* Returned Effect checked only, two signatures
* Returned Type checked only, two signatures
*/
final CMessage message = this.messageKey(id, point);
return this.readAsync(message, point);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
class HOneType implements HOne<ConcurrentMap<String, Class<?>>> {
@Override
public ConcurrentMap<String, Class<?>> combine(final KModule module, final KModule connect, final MultiMap headers) {
// 1. Extract Effect of module
// 1. Extract Type of module
final ConcurrentMap<String, Class<?>> moduleMap = this.loadType(module);
final ConcurrentMap<String, Class<?>> typeMap = new ConcurrentHashMap<>(moduleMap);

// 2. Extract Effect of connect
// 2. Extract Type of connect
if (Objects.nonNull(connect)) {
// Connect Bind
ConcurrentMap<String, Class<?>> connectMap = this.loadType(connect);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private KClass(final KApp app, final JsonObject configuration,
this.chLinkage.addAll(forLinkage(linkageSet, module));
}

// Analyzer for attribute ( Effect analyzing, Extract type from Dao )
// Analyzer for attribute ( Type analyzing, Extract type from Dao )
final JsonObject hybridInput = Ut.valueJObject(configuration, "hybrid");
{
/* attribute for current KClass */
Expand Down Expand Up @@ -177,7 +177,7 @@ static JsonObject loadHybrid(final JsonObject hybridJ, final KClass clazz) {
replaced.put(KName.ALIAS, original.getValue(KName.ALIAS));
final String originalType = original.getString(KName.TYPE);
if (!type.getName().equals(originalType)) {
LOGGER.warn("[ KClass ] Effect conflict, old = {0}, new = {1}",
LOGGER.warn("[ KClass ] Type conflict, old = {0}, new = {1}",
originalType, type.getName());
}
replaced.put(KName.TYPE, type.getName());
Expand Down Expand Up @@ -254,7 +254,7 @@ private static ConcurrentMap<String, Class<?>> loadType(final KClass clazz) {
*
* 「Node」
* - If there exist same `field`, field = clazz will be merged.
* - The priority is not important ( Same field must be the same Effect ).
* - The priority is not important ( Same field must be the same Type ).
* - The merge sequence is not important here
*/
linkageSet.forEach(identifier -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ public abstract class AbstractValve implements HValve {
* "code": "xxx",
* "mapping": {},
*
* "dmType": "Dm Effect",
* "dmType": "Dm Type",
* "dmComponent": "HDm Interface"
* "dmCondition": {},
* "dmConfig": {},
*
* "uiType": "Ui Effect",
* "uiType": "Ui Type",
* "uiComponent": "HUi Interface",
* "uiCondition": {},
* "uiConfig": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* ```shell
* // <pre><code>
* Content-Effect = application/json
* Content-Type = application/json
* Authorization = Basic xxxxx
* // </code></pre>
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ public Object apply(final String name, final Class<?> paramType, final RoutingCo
* 1. JsonArray
* 2. List<T>
*/
final boolean valid = Objects.nonNull(paramType) // 1) Effect is not null
&& (paramType.isAssignableFrom(List.class) // 2) Effect is implements List interface
|| JsonArray.class == paramType // 3) Effect is JsonArray data structure
final boolean valid = Objects.nonNull(paramType) // 1) Type is not null
&& (paramType.isAssignableFrom(List.class) // 2) Type is implements List interface
|| JsonArray.class == paramType // 3) Type is JsonArray data structure
|| Vis.class == paramType // 4) View structure defined
);
Fn.out(!valid, _415PointDefineException.class, this.getClass(), paramType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
* EventBus mode: Async
* Non-EventBus mode: Sync
* 2. Level 2: Distinguish the request mode
* One-Way mode: No response needed. ( Return Effect )
* Request-Response mode: Must require response. ( Return Effect )
* One-Way mode: No response needed. ( Return Type )
* Request-Response mode: Must require response. ( Return Type )
* Support modes:
* 1. AsyncAim: Event Bus: Request-Response
* 2. SyncAim: Non-Event Bus: Request-Response
Expand Down
Loading

0 comments on commit 60b2473

Please sign in to comment.