Skip to content

Commit

Permalink
Merge pull request #1253 from tuohai666/dev
Browse files Browse the repository at this point in the history
 #1172, for comments
  • Loading branch information
terrymanu authored Sep 14, 2018
2 parents 40292d5 + 8169ef4 commit cc52f22
Show file tree
Hide file tree
Showing 35 changed files with 423 additions and 221 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright 2016-2018 shardingsphere.io.
* <p>
* 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.
* </p>
*/

package io.shardingsphere.core.event.connection;

import io.shardingsphere.core.event.ShardingEvent;

/**
* Close connection event.
*
* @author zhangyonglun
*/
public class CloseConnectionEvent extends ShardingEvent {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright 2016-2018 shardingsphere.io.
* <p>
* 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.
* </p>
*/

package io.shardingsphere.core.event.connection;

/**
* Close connection finish event.
*
* @author zhangyonglun
*/
public final class CloseConnectionFinishEvent extends CloseConnectionEvent {
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,17 @@

package io.shardingsphere.core.event.connection;

import io.shardingsphere.core.event.ShardingEvent;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
* Connection close event.
* Close connection start event.
*
* @author zhangyonglun
*/
@RequiredArgsConstructor
@Getter
public final class ConnectionCloseEvent extends ShardingEvent {
public final class CloseConnectionStartEvent extends CloseConnectionEvent {

private final String dataSource;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,11 @@
package io.shardingsphere.core.event.connection;

import io.shardingsphere.core.event.ShardingEvent;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;

/**
* Get connection event.
*
* @author zhangyonglun
*/
@RequiredArgsConstructor
@Getter
public final class GetConnectionEvent extends ShardingEvent {

private final String dataSource;

@Setter
private String url = "";
public class GetConnectionEvent extends ShardingEvent {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright 2016-2018 shardingsphere.io.
* <p>
* 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.
* </p>
*/

package io.shardingsphere.core.event.connection;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
* Get connection finish event.
*
* @author zhangyonglun
*/
@RequiredArgsConstructor
@Getter
public final class GetConnectionFinishEvent extends GetConnectionEvent {

private final String url;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright 2016-2018 shardingsphere.io.
* <p>
* 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.
* </p>
*/

package io.shardingsphere.core.event.connection;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
* Get connection start event.
*
* @author zhangyonglun
*/
@RequiredArgsConstructor
@Getter
public final class GetConnectionStartEvent extends GetConnectionEvent {

private final String dataSource;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
* </p>
*/

package io.shardingsphere.core.event.executor.sql;
package io.shardingsphere.core.event.executor;

import io.shardingsphere.core.routing.RouteUnit;

import java.util.List;

/**
* DML execution event.
*
*
* @author zhangliang
* @author maxiaoguang
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
* </p>
*/

package io.shardingsphere.core.event.executor.sql;
package io.shardingsphere.core.event.executor;

import io.shardingsphere.core.routing.RouteUnit;

import java.util.List;

/**
* DQL execution event.
*
*
* @author gaohongtao
* @author maxiaoguang
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* </p>
*/

package io.shardingsphere.core.event.executor.sql;
package io.shardingsphere.core.event.executor;

import io.shardingsphere.core.event.ShardingEvent;
import io.shardingsphere.core.routing.RouteUnit;
Expand All @@ -26,7 +26,7 @@

/**
* SQL execution event.
*
*
* @author gaohongtao
* @author maxiaoguang
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* </p>
*/

package io.shardingsphere.core.event.executor.sql;
package io.shardingsphere.core.event.executor;

import io.shardingsphere.core.constant.SQLType;
import io.shardingsphere.core.executor.sql.SQLExecuteUnit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,11 @@
package io.shardingsphere.core.event.parsing;

import io.shardingsphere.core.event.ShardingEvent;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
* Parsing event.
*
* @author zhangyonglun
*/
@RequiredArgsConstructor
@Getter
public final class ParsingEvent extends ShardingEvent {

private final String sql;
public class ParsingEvent extends ShardingEvent {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright 2016-2018 shardingsphere.io.
* <p>
* 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.
* </p>
*/

package io.shardingsphere.core.event.parsing;

/**
* Parsing finish event.
*
* @author zhangyonglun
*/
public final class ParsingFinishEvent extends ParsingEvent {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright 2016-2018 shardingsphere.io.
* <p>
* 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.
* </p>
*/

package io.shardingsphere.core.event.parsing;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
* Parsing start event.
*
* @author zhangyonglun
*/
@RequiredArgsConstructor
@Getter
public final class ParsingStartEvent extends ParsingEvent {

private final String sql;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright 2016-2018 shardingsphere.io.
* <p>
* 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.
* </p>
*/

package io.shardingsphere.core.event.root;

import io.shardingsphere.core.event.ShardingEvent;

/**
* Root invoke event.
*
* @author gaohongtao
*/
public class RootInvokeEvent extends ShardingEvent {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright 2016-2018 shardingsphere.io.
* <p>
* 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.
* </p>
*/

package io.shardingsphere.core.event.root;

/**
* Root invoke finish event.
*
* @author zhangyonglun
*/
public final class RootInvokeFinishEvent extends RootInvokeEvent {
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,19 @@
* </p>
*/

package io.shardingsphere.core.event.executor.overall;
package io.shardingsphere.core.event.root;

import io.shardingsphere.core.event.ShardingEvent;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
* Overall sql execution event.
*
* @author gaohongtao
* Root invoke start event.
*
* @author zhangyonglun
*/
@RequiredArgsConstructor
@Getter
public final class OverallExecutionEvent extends ShardingEvent {
public final class RootInvokeStartEvent extends RootInvokeEvent {

private final boolean parallelExecute;
}
Loading

0 comments on commit cc52f22

Please sign in to comment.