Commit Graph

2981 Commits

Author SHA1 Message Date
Rsl1122
4e65f99228 Added missing license header 2019-02-19 13:01:17 +02:00
Rsl1122
1e87145767 Fixed sonar smells:
Level major:
- Specified exception in ServerServerInfo

Level minor:
- Unnecessary parentheses removed in BukkitUserImportRefiner

Level info:
- Removed DataCache
- Finished a todo in H2DB
2019-02-19 12:56:12 +02:00
Rsl1122
ee50ebde2c Removed ExecStatement#executeBatch, ExecBatchStatement should be used. 2019-02-19 12:52:27 +02:00
Rsl1122
4f63a3771b Refactored database clean task out of the database
Fixed SonarCloud smells:

Level blocker:
- Removed 'dbType' field from CreateIndexTransaction (is in Transaction)
- Removed unused 'dbSystem' from AnalysisContainer
2019-02-19 12:51:52 +02:00
Rsl1122
0d8c2f2824 Removed ProxySessionCache:
This class is no longer required since responsibility of storage of
sessions now lies with the caller and it's functionality can be
achieved by not saving the returned optional.
2019-02-19 12:36:13 +02:00
Rsl1122
a41a4683c6 Removed Column interface, not used:
- Removed TableSqlParser, not used
- Removed Select#from that used Column
- Removed Update#values that used Column
- Removed Insert#values that used Column
2019-02-19 12:32:11 +02:00
Rsl1122
000290bb24 Bump pluginbridge version to 4.7.0 2019-02-19 12:22:30 +02:00
Rsl1122
530c4a2ea6 Fixed pluginbridge
- AAC SQL stuff
- ViaVersion & ProtocolSupport SQL stuff
- Litebans SQL stuff
- PlaceholderAPIHook (unfinished) SQL stuff
- Towny & Vault DataCache stuff
- Removed since javadoc tags
- Bridge Version bump to 4.7.0
2019-02-19 12:21:07 +02:00
Rsl1122
acae1c4b3d Removed DBInitException throws clauses from methods 2019-02-18 18:21:14 +02:00
Rsl1122
0b7b0a5a16 Removed DBException:
- Made DBInitException subclass of DBOpException
2019-02-18 18:15:50 +02:00
Rsl1122
6fbd8ced60 Fixed concurrency issues with backup related commands 2019-02-18 18:03:09 +02:00
Rsl1122
e1bef920e7 Fixed connection system auth query 2019-02-18 17:59:02 +02:00
Rsl1122
8f3f2e9127 Fixed a network page query 2019-02-18 17:57:38 +02:00
Rsl1122
bbb158ddc5 Fixed peak TPS query 2019-02-18 17:20:04 +02:00
Rsl1122
c60003cda0 Made db field in Transaction private 2019-02-17 23:06:43 +02:00
Rsl1122
e2310e4376 Fixed Patch code failing if a table doesn't exist 2019-02-17 22:57:37 +02:00
Rsl1122
1378d3100e Transaction rollback fail no longer hides original exception 2019-02-17 22:52:30 +02:00
Rsl1122
8870e034e1 All database transactions are now performed by a single thread.
- Added a Database Access Lock object
  - Access log lets OperationCriticalTransactions through
  - Transactions skip query access log check
  - executeTransaction returns a Future to allow easier synchronization
  - ServerInfo waits for the server to be registered. This could lead
    to issues if a new server is registering to old database. It should
    not be too big of an issue since no patches need to be applied
    on first enable of the database.
- Added database states: CLOSED <-> INITIALIZING -> OPEN -> CLOSED

These two changes allow restricting queries to the database until the
database has properly initialized (Schema is in correct format)

- Removed SQLDB as a Patch class variable

Tests use Guava direct thread executor on the database to reduce
concurrency issues during tests. Another option would be to wait for
each transaction.
2019-02-16 20:26:08 +02:00
Rsl1122
2b9e407816 Removed sql Table class 2019-02-16 15:14:20 +02:00
Rsl1122
360e631fc9 Removed PatchTask 2019-02-16 14:58:54 +02:00
Rsl1122
33eec6d990 Moved to using JUnit 5.4 TempDir instead of junitpioneer 2019-02-16 14:55:00 +02:00
Rsl1122
039696910c Removed ProxyAPI and ServerAPI since implementations are the same 2019-02-16 14:48:36 +02:00
Rsl1122
23969192c1 Moved two peak player count queries to TPSQueries class 2019-02-16 14:29:28 +02:00
Rsl1122
f83be34f09 Deprecation javadoc messages to FetchOperations 2019-02-16 14:29:27 +02:00
Rsl1122
738a58edc2 Removed SQLErrorUtil 2019-02-16 14:29:26 +02:00
Rsl1122
328e42a19b Removed Database#fetch usage 2019-02-16 14:29:26 +02:00
Rsl1122
f77750c138 Removed SQLOps class 2019-02-16 14:29:25 +02:00
Rsl1122
463f56f340 TPSTable now static information class:
- Made constructor private
- Removed getter in SQLDB
2019-02-16 14:29:24 +02:00
Rsl1122
ba41952bee Refactored TPSTable#getPlayersOnlineForServers to a query 2019-02-16 14:29:23 +02:00
Rsl1122
6eafce05ba Removed TPSTable#getNetworkOnlineData - not used 2019-02-16 14:29:23 +02:00
Rsl1122
9f1479a65c Refactored TPSTable#getTPSData to a query 2019-02-16 14:29:22 +02:00
Rsl1122
fcdc281219 UserInfoTable is now static information class:
- Made constructor private
- Removed getter in SQLDB
2019-02-16 14:29:21 +02:00
Rsl1122
0c893ea59c Ban and Operator status Transactions:
- Removed SaveOperations
- Removed BanAndOpProcessor, PlayerProcessors
- Removed UserInfoTable#updateOpStatus, UserInfoTable#updateBanStatus
2019-02-16 14:29:20 +02:00
Rsl1122
57695d6e43 Created SessionEndTransaction:
- Removed SaveOperations#session
- Removed DBSystem dependency from SessionCache, so SessionCache does
  not need to be called from async thread. (SessionCache does not save,
  responsibility now with the caller)
2019-02-16 14:29:19 +02:00
Rsl1122
40a62874a3 Created ServerShutdownTransaction 2019-02-16 14:29:18 +02:00
Rsl1122
11369fe62d Fix syntax error in UserIdentifierQueries 2019-02-16 14:29:17 +02:00
Rsl1122
81b9925057 UsersTable now a static information class:
- Made constructor private
- Removed getter in SQLDB
2019-02-16 14:29:17 +02:00
Rsl1122
70e83a12b4 Refactored UsersTable#kicked to a transaction 2019-02-16 14:29:16 +02:00
Rsl1122
4c235b95e2 Refactored UsersTable#getMatchingNames to a query:
- Removed SearchOperations
2019-02-16 14:29:15 +02:00
Rsl1122
de7a1b3286 Refactored UsersTable#getPlayerName to a query 2019-02-16 14:29:14 +02:00
Rsl1122
57f7cb710a Split identifier (UUID, name) related queries to own class. 2019-02-16 14:29:13 +02:00
Rsl1122
c57021a116 Removed UsersTable#getTimesKicked - not used 2019-02-16 14:29:12 +02:00
Rsl1122
30bac0f6ca Refactored UsersTable#getUuidOf to a query 2019-02-16 14:29:12 +02:00
Rsl1122
bb52f29bd4 Refactored UsersTable#getPlayerNames to a query 2019-02-16 14:29:11 +02:00
Rsl1122
e398a53425 Refactored UsersTable#getUserInformation to a query 2019-02-16 14:29:10 +02:00
Rsl1122
ee74fc328e Refactored BukkitImporter to use new db things:
- Refactored UsersTable#getSavedUUIDs to a query
- Removed #getRegisterDates, #updateName, #getAllTimesKicked,
  #getUUIDsAndNamesByID - not used
- Refactored UserInfoTable#getSavedUUIDs to a query
- Removed UserInfoTable#getServerUserInfo - not used
2019-02-16 14:29:09 +02:00
Rsl1122
9616d5b6f0 Fixed possible ExecutorService leak in BukkitImporter 2019-02-16 14:29:08 +02:00
Rsl1122
4f68a59dcb Removed old world removal from UserImportRefiner 2019-02-16 14:29:08 +02:00
Rsl1122
29bd29979a Missing license header added 2019-02-16 14:29:07 +02:00
Rsl1122
8eede58cd6 SessionsTable now static information class:
- Made constructor private
- Removed getter in SQLDB
2019-02-16 14:29:06 +02:00