Class AbstractSQLAction<T>

    • Field Detail

      • sqlContent

        @NotNull
        protected final @NotNull java.lang.String sqlContent
    • Constructor Detail

      • AbstractSQLAction

        public AbstractSQLAction​(@NotNull
                                 @NotNull SQLManagerImpl manager,
                                 @NotNull
                                 @NotNull java.lang.String sql)
      • AbstractSQLAction

        public AbstractSQLAction​(@NotNull
                                 @NotNull SQLManagerImpl manager,
                                 @NotNull
                                 @NotNull java.lang.String sql,
                                 @NotNull
                                 @NotNull java.util.UUID uuid)
      • AbstractSQLAction

        public AbstractSQLAction​(@NotNull
                                 @NotNull SQLManagerImpl manager,
                                 @NotNull
                                 @NotNull java.lang.String sql,
                                 long createNanoTime)
      • AbstractSQLAction

        public AbstractSQLAction​(@NotNull
                                 @NotNull SQLManagerImpl manager,
                                 @NotNull
                                 @NotNull java.lang.String sql,
                                 @NotNull
                                 @NotNull java.util.UUID uuid,
                                 long createNanoTime)
    • Method Detail

      • getActionUUID

        @NotNull
        public @NotNull java.util.UUID getActionUUID()
        Description copied from interface: SQLAction
        得到该Action的UUID
        Specified by:
        getActionUUID in interface SQLAction<T>
        Returns:
        UUID
      • getShortID

        @NotNull
        public @NotNull java.lang.String getShortID()
        Description copied from interface: SQLAction
        得到短八位格式的UUID
        Specified by:
        getShortID in interface SQLAction<T>
        Returns:
        UUID(8)
      • getCreateTime

        public long getCreateTime​(java.util.concurrent.TimeUnit unit)
        Description copied from interface: SQLAction
        得到该Action的创建时间
        注意,此处获得的时间非时间戳毫秒数,仅用于计算耗时。
        Specified by:
        getCreateTime in interface SQLAction<T>
        Parameters:
        unit - 时间单位
        Returns:
        创建时间
      • getSQLContent

        @NotNull
        public @NotNull java.lang.String getSQLContent()
        Description copied from interface: SQLAction
        得到该Action所要执行的源SQL语句
        Specified by:
        getSQLContent in interface SQLAction<T>
        Returns:
        源SQL语句
      • debugMessage

        protected void debugMessage​(java.util.List<java.lang.Object[]> params)
      • executeFuture

        @NotNull
        public <R> @NotNull java.util.concurrent.CompletableFuture<R> executeFuture​(@NotNull
                                                                                    @NotNull SQLFunction<T,​R> handler)
        Description copied from interface: SQLAction
        以异步Future方式执行SQL语句。
        Specified by:
        executeFuture in interface SQLAction<T>
        Returns:
        异步执行的Future实例,可通过 Future.get() 阻塞并等待结果。