From 9b85eed52885e86176d12dfcbdd15237dd399964 Mon Sep 17 00:00:00 2001 From: Fabio Scotto di Santolo Date: Sun, 10 May 2020 11:53:01 +0200 Subject: [PATCH] Esempi di sincronizzazione tra thread --- .gitignore | 111 +++++++++++- .idea/workspace.xml | 167 ------------------ OracleCertificationTest.iml | 2 +- .../java8/professional/ConcurrencyTest.java | 51 ++++++ .../professional/concurrency/BankAccount.java | 19 ++ .../java8/professional/concurrency/Data.java | 40 +++++ .../professional/concurrency/PingPong.java | 29 +++ .../professional/concurrency/Receiver.java | 31 ++++ .../professional/concurrency/Sender.java | 37 ++++ 9 files changed, 315 insertions(+), 172 deletions(-) delete mode 100644 .idea/workspace.xml create mode 100644 src/com/oracle/java8/professional/ConcurrencyTest.java create mode 100644 src/com/oracle/java8/professional/concurrency/BankAccount.java create mode 100644 src/com/oracle/java8/professional/concurrency/Data.java create mode 100644 src/com/oracle/java8/professional/concurrency/PingPong.java create mode 100644 src/com/oracle/java8/professional/concurrency/Receiver.java create mode 100644 src/com/oracle/java8/professional/concurrency/Sender.java diff --git a/.gitignore b/.gitignore index a2d3d1f..60b502d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,92 @@ -# Add any directories, files, or patterns you don't want to be tracked by version control -# Created by https://www.gitignore.io/api/Java -# Edit at https://www.gitignore.io/?templates=Java + +# Created by https://www.gitignore.io/api/java,maven,intellij,sonar +# Edit at https://www.gitignore.io/?templates=java,maven,intellij,sonar + +### Intellij ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +.idea/modules.xml +.idea/*.iml +.idea/modules +*.iml +*.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### Intellij Patch ### +# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 + +modules.xml +.idea/misc.xml + +# Sonarlint plugin +.idea/**/sonarlint/ + +# SonarQube Plugin +.idea/**/sonarIssues.xml + +# Markdown Navigator plugin +.idea/**/markdown-navigator.xml +.idea/**/markdown-navigator/ ### Java ### # Compiled class file @@ -27,4 +113,21 @@ # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* -# End of https://www.gitignore.io/api/Java +### Maven ### +target/ +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +pom.xml.next +release.properties +dependency-reduced-pom.xml +buildNumber.properties +.mvn/timing.properties +.mvn/wrapper/maven-wrapper.jar +.flattened-pom.xml + +### Sonar ### +#Sonar generated dir +/.sonar/ + +# End of https://www.gitignore.io/api/java,maven,intellij,sonar diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index a7b65c7..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - - - - - - - - - - - -