Commit 77b78c7b authored by tristaZero's avatar tristaZero
Browse files

add renew

parents 4f9e97f7 8cacdd88
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
cache: 
  directories: 
    - "$HOME/.m2"
language: java
jdk:
  - oraclejdk8
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@

#### Core

1. [ISSUE #373](https://github.com/sharding-sphere/sharding-sphere/issues/373) Support `order by ?`
1. [ISSUE #610](https://github.com/sharding-sphere/sharding-sphere/issues/610) Route unicast for DQL without table
1. [ISSUE #701](https://github.com/sharding-sphere/sharding-sphere/issues/701) Caching parsed results to improve performance
1. [ISSUE #773](https://github.com/sharding-sphere/sharding-sphere/issues/773) Support sharding and autoincrement key of INSERT without column names
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@

#### 内核

1. [ISSUE #373](https://github.com/sharding-sphere/sharding-sphere/issues/373) 支持`order by ?`
1. [ISSUE #610](https://github.com/sharding-sphere/sharding-sphere/issues/610) 无表名称的DQL采用单播路由
1. [ISSUE #701](https://github.com/sharding-sphere/sharding-sphere/issues/701) 缓存SQL解析结果以提升性能
1. [ISSUE #773](https://github.com/sharding-sphere/sharding-sphere/issues/773) 支持不包含列名的INSERT语句的分片与自增主键
+17 −14
Original line number Diff line number Diff line
@@ -15,37 +15,40 @@
 * </p>
 */

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

import com.google.common.base.Optional;
import lombok.Getter;
import lombok.Setter;

import java.util.UUID;

/**
 * SQL execution event.
 * Sharding event.
 *
 * @author zhangliang
 */
public abstract class AbstractExecutionEvent {
    
@Getter
public class ShardingEvent {
    
    private final String id = UUID.randomUUID().toString();
    
    @Getter
    @Setter
    private EventExecutionType eventExecutionType = EventExecutionType.BEFORE_EXECUTE;
    private ShardingEventType eventType = ShardingEventType.BEFORE_EXECUTE;
    
    @Setter
    private Exception exception;
    
    /**
     * Get exception.
     * Set execute success.
     */
    public void setExecuteSuccess() {
        eventType = ShardingEventType.EXECUTE_SUCCESS;
    }
    
    /**
     * Set execute failure.
     * 
     * @return exception
     * @param cause fail cause
     */
    public Optional<? extends Exception> getException() {
        return Optional.fromNullable(exception);
    public void setExecuteFailure(final Exception cause) {
        eventType = ShardingEventType.EXECUTE_FAILURE;
        exception = cause;
    }
}
+5 −5
Original line number Diff line number Diff line
@@ -15,26 +15,26 @@
 * </p>
 */

package io.shardingsphere.core.util;
package io.shardingsphere.core.event;

import com.google.common.eventbus.EventBus;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;

/**
 * Event bus for singleton instance.
 * Sharding event bus for singleton instance.
 * 
 * @author zhangliang
 */
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class EventBusInstance {
public final class ShardingEventBusInstance {
    
    private static final EventBus INSTANCE = new EventBus();
    
    /**
     * Get event bus instance.
     * Get sharding event bus instance.
     * 
     * @return event bus instance
     * @return sharding event bus instance
     */
    public static EventBus getInstance() {
        return INSTANCE;
Loading