Class LockRepositoryImpl

    • Field Detail

      • MYSQL_LOCK_SELECT_QUERY

        protected static final java.lang.String MYSQL_LOCK_SELECT_QUERY
        See Also:
        Constant Field Values
      • POSTGRE_LOCK_SELECT_QUERY

        protected static final java.lang.String POSTGRE_LOCK_SELECT_QUERY
        See Also:
        Constant Field Values
      • MSSQL_LOCK_SELECT_QUERY

        protected static final java.lang.String MSSQL_LOCK_SELECT_QUERY
        See Also:
        Constant Field Values
      • H2_LOCK_SELECT_QUERY

        protected static final java.lang.String H2_LOCK_SELECT_QUERY
        See Also:
        Constant Field Values
      • MYSQL_LOCK_INSERT_QUERY

        protected static final java.lang.String MYSQL_LOCK_INSERT_QUERY
        See Also:
        Constant Field Values
      • POSTGRE_LOCK_INSERT_QUERY

        protected static final java.lang.String POSTGRE_LOCK_INSERT_QUERY
        See Also:
        Constant Field Values
      • MSSQL_LOCK_INSERT_QUERY

        protected static final java.lang.String MSSQL_LOCK_INSERT_QUERY
        See Also:
        Constant Field Values
      • H2_LOCK_INSERT_QUERY

        protected static final java.lang.String H2_LOCK_INSERT_QUERY
        See Also:
        Constant Field Values
    • Constructor Detail

      • LockRepositoryImpl

        public LockRepositoryImpl​(javax.sql.DataSource dataSource)
    • Method Detail

      • lockTask

        public boolean lockTask​(java.lang.String key,
                                java.lang.String method,
                                long time,
                                java.lang.String server)
                         throws DatabaseException
        Description copied from interface: LockRepository
        Acquire task lock from database
        Specified by:
        lockTask in interface LockRepository
        Parameters:
        key - that identifies task
        method - class and method where task was running
        time - to lock task
        server - identification (server hostname)
        Returns:
        true if can acquire lock or false if not
        Throws:
        DatabaseException - that was thrown when do not have database configured