Initial populations

This commit is contained in:
2021-11-16 11:19:21 +07:00
parent cdac14e7fd
commit bee21d279a
2168 changed files with 849329 additions and 0 deletions
@@ -0,0 +1,23 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.fourelementscapital</groupId>
<artifactId>lib-scheduler</artifactId>
<version>1.0</version>
</parent>
<groupId>com.fourelementscapital</groupId>
<artifactId>lib-scheduler-exception</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<name>lib-scheduler-exception</name>
<description>Scheduler Libraries related to Exception</description>
<url>http://www.fourelementscapital.com</url>
<dependencies>
</dependencies>
</project>
@@ -0,0 +1,23 @@
/******************************************************************************
*
* Copyright: Intellectual Property of Four Elements Capital Pte Ltd, Singapore.
* All rights reserved.
*
******************************************************************************/
package com.fourelementscapital.scheduler.exception;
public class ExceptionDependencyTimeout extends SchedulerException {
public ExceptionDependencyTimeout(String msg) {
super(msg);
}
public int getErrorcode() {
return DEPENDENCY_TIMEDOUT;
}
}
@@ -0,0 +1,22 @@
/******************************************************************************
*
* Copyright: Intellectual Property of Four Elements Capital Pte Ltd, Singapore.
* All rights reserved.
*
******************************************************************************/
package com.fourelementscapital.scheduler.exception;
public class ExceptionExecutionTimeout extends ExceptionSchedulerTeamRelated {
public ExceptionExecutionTimeout(String msg) {
super(msg);
}
public int getErrorcode() {
return EXECUTION_TIMEOUT;
}
}
@@ -0,0 +1,24 @@
/******************************************************************************
*
* Copyright: Intellectual Property of Four Elements Capital Pte Ltd, Singapore.
* All rights reserved.
*
******************************************************************************/
package com.fourelementscapital.scheduler.exception;
public class ExceptionPeerNoResponse extends SchedulerException {
public ExceptionPeerNoResponse(String msg) {
super(msg);
}
public int getErrorcode() {
return ERROR_SERVER_REMOVE_PEER_NO_RESPONSE;
}
}
@@ -0,0 +1,25 @@
/******************************************************************************
*
* Copyright: Intellectual Property of Four Elements Capital Pte Ltd, Singapore.
* All rights reserved.
*
******************************************************************************/
package com.fourelementscapital.scheduler.exception;
public class ExceptionPeerRejected extends SchedulerException {
public ExceptionPeerRejected(String msg) {
super(msg==null?"No Room to Execute the Script":msg);
}
public int getErrorcode() {
return FAIL_PEER_REJECTED;
}
}
@@ -0,0 +1,28 @@
/******************************************************************************
*
* Copyright: Intellectual Property of Four Elements Capital Pte Ltd, Singapore.
* All rights reserved.
*
******************************************************************************/
package com.fourelementscapital.scheduler.exception;
public class ExceptionPeerUnknown extends ExceptionSchedulerTeamRelated {
public ExceptionPeerUnknown(String msg) {
super(msg);
}
public int getErrorcode() {
return ERROR_PEER_UNKNOWN;
}
}
@@ -0,0 +1,25 @@
/******************************************************************************
*
* Copyright: Intellectual Property of Four Elements Capital Pte Ltd, Singapore.
* All rights reserved.
*
******************************************************************************/
package com.fourelementscapital.scheduler.exception;
public class ExceptionRScriptNullError extends ExceptionSchedulerTeamRelated {
public ExceptionRScriptNullError(String msg) {
super(msg);
}
public int getErrorcode() {
return ERROR_PEER_R_RETURN_NULL;
}
}
@@ -0,0 +1,25 @@
/******************************************************************************
*
* Copyright: Intellectual Property of Four Elements Capital Pte Ltd, Singapore.
* All rights reserved.
*
******************************************************************************/
package com.fourelementscapital.scheduler.exception;
public class ExceptionRServeUnixFailure extends ExceptionSchedulerTeamRelated {
public ExceptionRServeUnixFailure(String msg) {
super(msg);
}
public int getErrorcode() {
return ERROR_PEER_FAILED_2START_UNIX_RSERVE;
}
}
@@ -0,0 +1,27 @@
/******************************************************************************
*
* Copyright: Intellectual Property of Four Elements Capital Pte Ltd, Singapore.
* All rights reserved.
*
******************************************************************************/
package com.fourelementscapital.scheduler.exception;
public class ExceptionRServeWindowsFailure extends ExceptionSchedulerTeamRelated {
public ExceptionRServeWindowsFailure(String msg) {
super(msg);
}
public int getErrorcode() {
return ERROR_PEER_FAILED_2START_WIN_RSERVE;
}
}
@@ -0,0 +1,25 @@
/******************************************************************************
*
* Copyright: Intellectual Property of Four Elements Capital Pte Ltd, Singapore.
* All rights reserved.
*
******************************************************************************/
package com.fourelementscapital.scheduler.exception;
public class ExceptionRemoveFromQ extends ExceptionSchedulerTeamRelated {
public ExceptionRemoveFromQ(String msg) {
super(msg);
}
public int getErrorcode() {
return ERROR_SERVER_GENERAL_QUEUE_KICKCOUT;
}
}
@@ -0,0 +1,25 @@
/******************************************************************************
*
* Copyright: Intellectual Property of Four Elements Capital Pte Ltd, Singapore.
* All rights reserved.
*
******************************************************************************/
package com.fourelementscapital.scheduler.exception;
public class ExceptionRemoveFromQNotInPeer extends SchedulerException {
public ExceptionRemoveFromQNotInPeer(String msg) {
super(msg);
}
public int getErrorcode() {
return ERROR_SERVER_REMOVE_NOT_RUNNING_INPEER;
}
}
@@ -0,0 +1,25 @@
/******************************************************************************
*
* Copyright: Intellectual Property of Four Elements Capital Pte Ltd, Singapore.
* All rights reserved.
*
******************************************************************************/
package com.fourelementscapital.scheduler.exception;
public class ExceptionRscriptError extends SchedulerException {
public ExceptionRscriptError(String msg) {
super(msg);
}
public int getErrorcode() {
return ERROR_SERVER_GENERAL_SCRIPT_ERROR;
}
}
@@ -0,0 +1,18 @@
/******************************************************************************
*
* Copyright: Intellectual Property of Four Elements Capital Pte Ltd, Singapore.
* All rights reserved.
*
******************************************************************************/
package com.fourelementscapital.scheduler.exception;
public abstract class ExceptionSchedulerTeamRelated extends SchedulerException {
public ExceptionSchedulerTeamRelated(String msg) {
super(msg);
}
}
@@ -0,0 +1,25 @@
/******************************************************************************
*
* Copyright: Intellectual Property of Four Elements Capital Pte Ltd, Singapore.
* All rights reserved.
*
******************************************************************************/
package com.fourelementscapital.scheduler.exception;
public class ExceptionUnixPeerUnknown extends ExceptionSchedulerTeamRelated {
public ExceptionUnixPeerUnknown(String msg) {
super(msg);
}
public int getErrorcode() {
return ERROR_UNIX_PEER_UNKNOWN;
}
}
@@ -0,0 +1,23 @@
/******************************************************************************
*
* Copyright: Intellectual Property of Four Elements Capital Pte Ltd, Singapore.
* All rights reserved.
*
******************************************************************************/
package com.fourelementscapital.scheduler.exception;
public class ExceptionWarningNoFullData extends SchedulerException {
public ExceptionWarningNoFullData(String msg) {
super(msg);
}
public int getErrorcode() {
return 0;
}
}
@@ -0,0 +1,55 @@
/******************************************************************************
*
* Copyright: Intellectual Property of Four Elements Capital Pte Ltd, Singapore.
* All rights reserved.
*
******************************************************************************/
package com.fourelementscapital.scheduler.exception;
public abstract class SchedulerException extends Exception {
public static final int ERROR_PEER_R_RETURN_NULL=2311;
public static final int ERROR_SERVER_GENERAL_SCRIPT_ERROR=2312;
public static final int ERROR_PEER_FAILED_2START_WIN_RSERVE=2113;
public static final int ERROR_PEER_FAILED_2START_UNIX_RSERVE=2214;
//public static final int ERROR_SERVER_GENERAL_EXE_TIMEOUT=2315;
public static final int ERROR_SERVER_GENERAL_QUEUE_KICKCOUT=2316;
public static final int ERROR_PEER_UNKNOWN=2319;
public static final int ERROR_SERVER_UNKNOWN=2320;
public static final int FAIL_PEER_REJECTED=2317;
public static final int ERROR_UNIX_PEER_UNKNOWN= 2220;
public static final int EXECUTION_TIMEOUT= 2315;
public static final int DEPENDENCY_TIMEDOUT=2321;
public static final int ERROR_SERVER_REMOVE_PEER_NO_RESPONSE=2317;
public static final int ERROR_SERVER_REMOVE_NOT_RUNNING_INPEER=2318;
private String message;
public SchedulerException(String msg){
this.message=msg;
}
public String getExceptionclass() {
return this.getClass().getName();
}
public abstract int getErrorcode();
public String getMessage() {
return message;
}
protected void setMessage(String msg) {
message=msg;
}
}
@@ -0,0 +1,47 @@
/******************************************************************************
*
* Copyright: Intellectual Property of Four Elements Capital Pte Ltd, Singapore.
* All rights reserved.
*
******************************************************************************/
package com.fourelementscapital.scheduler.exception;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for App
*/
public class AppTest extends TestCase {
/**
* Create the test case
*
* @param testName name of the test case
*/
public AppTest( String testName )
{
super( testName );
}
/**
* @return the suite of tests being tested
*/
public static Test suite()
{
return new TestSuite( AppTest.class );
}
/**
* Empty Test
*/
public void testApp()
{
assertTrue( true );
}
}