Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PacktPublishing/Java-9-Concurrency-Cookbook-Second-Edition
/ functions
Functions
896 in github.com/PacktPublishing/Java-9-Concurrency-Cookbook-Second-Edition
⨍
Functions
896
◇
Types & classes
350
Method
OptimisticReader
(Position position, StampedLock lock)
Chapter02/ch02_recipe06/src/com/packtpub/java9/concurrency/cookbook/chapter02/recipe06/task/OptimisticReader.java:11
Method
ParkingCash
()
Chapter02/ch02_recipe01_problem/src/com/packtpub/java9/concurrency/cookbook/chapter02/recipe01/parking/ParkingCash.java:9
Method
ParkingCash
()
Chapter02/ch02_recipe01_solution/src/com/packtpub/java9/concurrency/cookbook/chapter02/recipe01/parking/ParkingCash.java:9
Method
ParkingCounter
Constructor of the class @param maxNumber Max number accepter by this counter
Chapter08/ch08_recipe10/src/com/packtpub/java9/concurrency/cookbook/chapter08/recipe10/task/ParkingCounter.java:26
Method
ParkingStats
Constructor of the class
Chapter02/ch02_recipe01_problem/src/com/packtpub/java9/concurrency/cookbook/chapter02/recipe01/parking/ParkingStats.java:17
Method
ParkingStats
Constructor of the class
Chapter02/ch02_recipe01_solution/src/com/packtpub/java9/concurrency/cookbook/chapter02/recipe01/parking/ParkingStats.java:23
Method
Participant
Constructor of the class. Initialize its attributes @param conference VideoConference in which is going to take part off @param name Name of the parti
Chapter03/ch03_recipe02/src/com/packtpub/java9/concurrency/cookbook/chapter03/recipe02/task/Participant.java:26
Method
PersonImmutable
(String firstName, String lastName, String address, Date birthDate)
Chapter11/app_recipe01/src/com/packtpub/java9/concurrency/cookbook/appendix/recipe01/PersonImmutable.java:11
Method
PersonMapTask
(List<Person> persons, ConcurrentHashMap<String, ConcurrentLinkedDeque<Person>> personMap)
Chapter11/app_recipe12/src/com/packtpub/java9/concurrency/cookbook/appendix/recipe12/task/PersonMapTask.java:20
Method
PollTask
Constructor of the class @param list List to delete the elements
Chapter07/ch07_recipe01/src/com/packtpub/java9/concurrency/cookbook/chapter07/recipe01/task/PollTask.java:22
Method
PricesInfo
Constructor of the class. Initializes the prices and the Lock
Chapter02/ch02_recipe04/src/com/packtpub/java9/concurrency/cookbook/chapter02/recipe04/task/PricesInfo.java:30
Method
PrintQueue
Constructor of the class. It initializes the three objects
Chapter03/ch03_recipe01/src/com/packtpub/java9/concurrency/cookbook/chapter03/recipe01/task/PrintQueue.java:38
Method
PrintQueue
Creates a lock to control the access to the queue. With the boolean attribute, we control the fairness of the Lock
Chapter02/ch02_recipe03/src/com/packtpub/java9/concurrency/cookbook/chapter02/recipe03/task/PrintQueue.java:18
Method
Producer
Constructor of the class. Initializes its attributes @param buffer Buffer to save the events produced @param exchanger Exchanger to syncrhonize with t
Chapter03/ch03_recipe06/src/com/packtpub/java9/concurrency/cookbook/chapter03/recipe06/task/Producer.java:27
Method
Producer
Constructor of the class. Initializes its parameters @param name Name of the producer @param buffer Buffer to store the objects
Chapter10/ch10_recipe03/src/com/packtpub/java9/concurrency/cookbook/chapter10/recipe03/task/Producer.java:27
Method
Producer
Constructor of the class. Initialize the objects @param mock Simulated file @param buffer Buffer
Chapter02/ch02_recipe05/src/com/packtpub/java9/concurrency/cookbook/chapter02/recipe05/task/Producer.java:30
Method
Producer
Constructor of the class. Initialize the storage. @param storage The store to work with
Chapter02/ch02_recipe02/src/com/packtpub/java9/concurrency/cookbook/chapter02/recipe02/task/Producer.java:18
Method
Producer
Constructor of the class. It initializes its parameters @param buffer Buffer to store the events
Chapter08/ch08_recipe09/src/com/packtpub/java9/concurrency/cookbook/chapter08/recipe09/task/Producer.java:19
Method
PublisherTask
(ConsumerData consumerData, News news)
Chapter08/ch08_recipe12/src/com/packtpub/java9/concurrency/cookbook/chapter08/recipe12/stream/PublisherTask.java:10
Method
Reader
(Position position, StampedLock lock)
Chapter02/ch02_recipe06/src/com/packtpub/java9/concurrency/cookbook/chapter02/recipe06/task/Reader.java:11
Method
Reader
Constructor of the class @param pricesInfo object that stores the prices
Chapter02/ch02_recipe04/src/com/packtpub/java9/concurrency/cookbook/chapter02/recipe04/task/Reader.java:20
Method
ReportGenerator
Constructor of the class. Initializes the two attributes @param sender The sender of the report @param title The title of the report
Chapter04/ch04_recipe09/src/com/packtpub/java9/concurrency/cookbook/chapter04/recipe09/task/ReportGenerator.java:28
Method
ReportProcessor
Constructor of the class. It initializes the attributes of the class @param service The CompletionService used to execute the ReportGenerator tasks
Chapter04/ch04_recipe09/src/com/packtpub/java9/concurrency/cookbook/chapter04/recipe09/task/ReportProcessor.java:29
Method
ReportRequest
Constructor of the class. Initializes the parameters @param name Name of the ReportRequest @param service Service used for the execution of tasks
Chapter04/ch04_recipe09/src/com/packtpub/java9/concurrency/cookbook/chapter04/recipe09/task/ReportRequest.java:28
Method
ResultTask
Constructor of the Class. Override one of the constructor of its parent class @param callable The task this object manages
Chapter04/ch04_recipe08/src/com/packtpub/java9/concurrency/cookbook/chapter04/recipe08/task/ResultTask.java:22
Method
Results
Constructor of the class. Initializes its attributes @param size Size of the array to store the results
Chapter03/ch03_recipe03/src/com/packtpub/java9/concurrency/cookbook/chapter03/recipe03/utils/Results.java:19
Method
SearchNumberTask
Constructor of the class @param array Array of numbers @param start Start position of the block of numbers this task has to process @param end End pos
Chapter05/ch05_recipe05/src/com/packtpub/java9/concurrency/cookbook/chapter05/recipe05/task/SearchNumberTask.java:63
Method
Searcher
Constructor of the class. Initializes its attributes @param firstRow First row where look for @param lastRow Last row where fook for @param mock Objec
Chapter03/ch03_recipe03/src/com/packtpub/java9/concurrency/cookbook/chapter03/recipe03/task/Searcher.java:54
Method
SeedGenerator
(CompletableFuture<Integer> completable)
Chapter03/ch03_recipe07/src/com/packtpub/java9/concurrency/cookbook/chapter03/recipe07/task/SeedGenerator.java:10
Method
Sensor
(ParkingStats stats)
Chapter02/ch02_recipe01_problem/src/com/packtpub/java9/concurrency/cookbook/chapter02/recipe01/parking/Sensor.java:9
Method
Sensor
(ParkingStats stats)
Chapter02/ch02_recipe01_solution/src/com/packtpub/java9/concurrency/cookbook/chapter02/recipe01/parking/Sensor.java:9
Method
Sensor1
Constructor of the class. It initializes its attributes @param counter Counter of cars in the parking
Chapter08/ch08_recipe10/src/com/packtpub/java9/concurrency/cookbook/chapter08/recipe10/task/Sensor1.java:18
Method
Sensor2
Constructor of the class. It initializes its attributes @param counter Counter of cars in the parking
Chapter08/ch08_recipe10/src/com/packtpub/java9/concurrency/cookbook/chapter08/recipe10/task/Sensor2.java:18
Method
Server
Constructor of the class. Creates the executor object
Chapter04/ch04_recipe01/src/com/packtpub/java9/concurrency/cookbook/chapter04/recipe01/task/Server.java:22
Method
Student
Constructor of the class. Initialize its objects @param phaser Phaser to control the execution
Chapter03/ch03_recipe05/src/com/packtpub/java9/concurrency/cookbook/chapter03/recipe05/task/Student.java:22
Method
Task
Constructor of the class @param name Name of the task
Chapter04/ch04_recipe05/src/com/packtpub/java9/concurrency/cookbook/chapter04/recipe05/task/Task.java:23
Method
Task
Constructor of the class. Initializes the name of the task @param name Name assigned to the task
Chapter04/ch04_recipe01/src/com/packtpub/java9/concurrency/cookbook/chapter04/recipe01/task/Task.java:26
Method
Task
Constructor of the class @param name the name of the class
Chapter04/ch04_recipe06/src/com/packtpub/java9/concurrency/cookbook/chapter04/recipe06/task/Task.java:24
Method
Task
Constructor of the class @param name Initializes the name of the task
Chapter04/ch04_recipe04/src/com/packtpub/java9/concurrency/cookbook/chapter04/recipe04/task/Task.java:22
Method
Task
Constructor of the class. It initializes its attributes @param id Id of the task @param queue Priority queue to store the event
Chapter07/ch07_recipe03/src/com/packtpub/java9/concurrency/cookbook/chapter07/recipe03/task/Task.java:30
Method
Task
Constructor of the class that initializes its events @param map Navigable map to store the events @param id Id of the task
Chapter07/ch07_recipe05/src/com/packtpub/java9/concurrency/cookbook/chapter07/recipe05/task/Task.java:31
Method
Task
(Flag flag)
Chapter07/ch07_recipe09/src/com/packtpub/java9/concurrency/cookbook/chapter07/recipe09/task/Task.java:11
Method
Task
Constructor of the class. It initializes its attributes @param id Id of the task @param queue Delayed queue to store the events
Chapter07/ch07_recipe04/src/com/packtpub/java9/concurrency/cookbook/chapter07/recipe04/task/Task.java:30
Method
Task
Constructor of the class @param array Array to process @param start Start position of the block of elements this task has to process @param end End po
Chapter05/ch05_recipe04/src/com/packtpub/java9/concurrency/cookbook/chapter05/recipe04/task/Task.java:38
Method
Task
Constructor of the class. Initializes its attributes @param products list of products @param first first element of the list assigned to the task @par
Chapter05/ch05_recipe01/src/com/packtpub/java9/concurrency/cookbook/chapter05/recipe01/task/Task.java:45
Method
Task
Constructor of the class @param runnable FileSearh object that is going to execute @param result Object to return as result. We are going to ignore th
Chapter10/ch10_recipe01/src/com/packtpub/java9/concurrency/cookbook/chapter10/recipe01/task/Task.java:21
Method
Task
Constructor of the class. Initializes its attributes @param array Array of elements this task has to process @param start Start position of the set of
Chapter09/ch09_recipe04/src/com/packtpub/java9/concurrency/cookbook/chapter09/recipe04/forkjoin/Task.java:44
Method
Task
Constructor of the class. Initialize its attributes @param time Number of seconds this task is going to sleep the thread in each phase @param phaser P
Chapter09/ch09_recipe02/src/com/packtpub/java9/concurrency/cookbook/chapter09/recipe02/phaser/Task.java:28
Method
Task
Constructor of the class @param lock Lock used in the task
Chapter09/ch09_recipe07/src/com/packtpub/java9/concurrency/cookbook/chapter09/recipe07/task/Task.java:21
Method
Task
Constructor of the class @param lock Lock shared by all the tasks
Chapter09/ch09_recipe01/src/com/packtpub/java9/concurrency/cookbook/chapter09/recipe01/lock/Task.java:23
Method
Task
Constructor of the task. Initializes its attributes @param milliseconds Number of milliseconds this task is going to sleep the thread
Chapter09/ch09_recipe03/src/com/packtpub/java9/concurrency/cookbook/chapter09/recipe03/executor/Task.java:20
Method
Task
(int array[])
Chapter11/app_recipe08/src/com/packtpub/java9/concurrency/cookbook/appendix/recipe08/task/Task.java:9
Method
Task
(Lock lock)
Chapter11/app_recipe09/src/com/packtpub/java9/concurrency/cookbook/appendix/recipe09/task/Task.java:14
Method
Task
Constructor of the class @param name Name of the task @param lock Lock used by the task
Chapter08/ch08_recipe08/src/com/packtpub/java9/concurrency/cookbook/chapter08/recipe08/task/Task.java:26
Method
Task
Constructor of the class. It initializes its attributes @param name Name of the task @param array Array of elements that is going to be incremented @p
Chapter08/ch08_recipe07/src/com/packtpub/java9/concurrency/cookbook/chapter08/reciper07/task/Task.java:36
Method
Task1
(Lock lock)
Chapter11/app_recipe04/src/com/packtpub/java9/concurrency/cookbook/appendix/recipe04/task/Task1.java:11
Method
Task2
(Lock lock)
Chapter11/app_recipe04/src/com/packtpub/java9/concurrency/cookbook/appendix/recipe04/task/Task2.java:11
Method
TaskAtomic
()
Chapter11/app_recipe03/src/com/packtpub/java9/concurrency/cookbook/appendix/recipe03/task/TaskAtomic.java:9
Method
TaskFJ
(int array[], int start, int end)
Chapter11/app_recipe08/src/com/packtpub/java9/concurrency/cookbook/appendix/recipe08/task/TaskFJ.java:11
Method
TaskLock
()
Chapter11/app_recipe03/src/com/packtpub/java9/concurrency/cookbook/appendix/recipe03/task/TaskLock.java:11
Method
TaskManager
Constructor of the class. Initializes the list of tasks
Chapter05/ch05_recipe05/src/com/packtpub/java9/concurrency/cookbook/chapter05/recipe05/util/TaskManager.java:23
Method
TaskSemaphore
Constructor of the class. Initializes its attribute @param semaphore Semaphore by all the tasks
Chapter10/ch10_recipe05/src/com/packtpub/java9/concurrency/cookbook/chapter10/recipe05/semaphore/TaskSemaphore.java:21
Method
UserValidator
Constructor of the class @param name The name of the user validation system
Chapter04/ch04_recipe03/src/com/packtpub/java9/concurrency/cookbook/chapter04/recipe03/task/UserValidator.java:23
Method
ValidatorTask
Constructor of the class @param validator The user validator system used to validate it @param user The name of the user @param password The password
Chapter04/ch04_recipe03/src/com/packtpub/java9/concurrency/cookbook/chapter04/recipe03/task/ValidatorTask.java:32
Method
Videoconference
Constructor of the class. Initializes the CountDownLatch @param number The number of participants in the videoconference
Chapter03/ch03_recipe02/src/com/packtpub/java9/concurrency/cookbook/chapter03/recipe02/task/Videoconference.java:24
Method
VolatileTask
(VolatileFlag flag)
Chapter07/ch07_recipe09/src/com/packtpub/java9/concurrency/cookbook/chapter07/recipe09/task/VolatileTask.java:11
Method
Writer
(Position position, StampedLock lock)
Chapter02/ch02_recipe06/src/com/packtpub/java9/concurrency/cookbook/chapter02/recipe06/task/Writer.java:11
Method
Writer
Constructor of the class @param pricesInfo object that stores the prices
Chapter02/ch02_recipe04/src/com/packtpub/java9/concurrency/cookbook/chapter02/recipe04/task/Writer.java:20
Method
WriterTask
Constructor of the class @param deque data structure that stores the event
Chapter01/ch01_recipe06/src/com/packtpub/java9/concurrency/cookbook/chapter01/recipe06/task/WriterTask.java:26
Method
afterExecute
This method is executed after the execution of a task. We calculate the execution time of the task
Chapter08/ch08_recipe01/src/com/packtpub/java9/concurrency/cookbook/chapter08/recipe01/executor/MyExecutor.java:79
Method
apply
(List<Long> list)
Chapter03/ch03_recipe07/src/com/packtpub/java9/concurrency/cookbook/chapter03/recipe07/task/NumberSelector.java:8
Method
beforeExecute
This method is executed before the execution of a task. We store the start date in the HashMap
Chapter08/ch08_recipe01/src/com/packtpub/java9/concurrency/cookbook/chapter08/recipe01/executor/MyExecutor.java:70
Method
call
Main method of the task. It waits a random period of time and returns a message
Chapter04/ch04_recipe08/src/com/packtpub/java9/concurrency/cookbook/chapter04/recipe08/task/ExecutableTask.java:28
Method
call
Main method of the task. Writes a message to the console with the actual date and returns the 'Hello world' string
Chapter04/ch04_recipe05/src/com/packtpub/java9/concurrency/cookbook/chapter04/recipe05/task/Task.java:31
Method
call
Main method of the ReportGenerator. Waits a random period of time and then generates the report as a String.
Chapter04/ch04_recipe09/src/com/packtpub/java9/concurrency/cookbook/chapter04/recipe09/task/ReportGenerator.java:37
Method
call
Core method of the Callable interface. Tries to validate the user using the user validation system. If the user is validated, returns the name of the
Chapter04/ch04_recipe03/src/com/packtpub/java9/concurrency/cookbook/chapter04/recipe03/task/ValidatorTask.java:45
Method
call
Method called by the executor to execute this task and calculate the factorial of a number
Chapter04/ch04_recipe02/src/com/packtpub/java9/concurrency/cookbook/chapter04/recipe02/task/FactorialCalculator.java:31
Method
call
Main method of the task. It has an infinite loop that writes a message to the console every 100 milliseconds
Chapter04/ch04_recipe07/src/com/packtpub/java9/concurrency/cookbook/chapter04/recipe07/task/Task.java:16
Method
call
Main method of the task. Waits during a random period of time and then calculates the sum of five random numbers
Chapter04/ch04_recipe04/src/com/packtpub/java9/concurrency/cookbook/chapter04/recipe04/task/Task.java:30
Method
call
Main method of the tasks. It only sleeps the current thread for two seconds
Chapter08/ch08_recipe01/src/com/packtpub/java9/concurrency/cookbook/chapter08/recipe01/task/SleepTwoSecondsTask.java:16
Method
compareTo
Method that compares two events and decide which has more priority
Chapter07/ch07_recipe03/src/com/packtpub/java9/concurrency/cookbook/chapter07/recipe03/task/Event.java:54
Method
compareTo
Method to compare two events
Chapter07/ch07_recipe04/src/com/packtpub/java9/concurrency/cookbook/chapter07/recipe04/task/Event.java:31
Method
compareTo
Method to compare two tasks. It calls the compareTo() method of the original task
Chapter08/ch08_recipe05/src/com/packtpub/java9/concurrency/cookbook/chapter08/recipe05/task/MyScheduledTask.java:80
Method
compareTo
Method that compares two events and decide which has more priority
Chapter08/ch08_recipe09/src/com/packtpub/java9/concurrency/cookbook/chapter08/recipe09/task/Event.java:50
Method
compareTo
Method that compares the priorities of two tasks. The task with higher priority value will be stored before in the list and it will be executed before
Chapter08/ch08_recipe02/src/com/packtpub/java9/concurrency/cookbook/chapter08/recipe02/task/MyPriorityTask.java:46
Method
compute
If the block of number this task has to process has more than ten elements, divide that block in two parts and create two new Tasks using the launchTa
Chapter05/ch05_recipe05/src/com/packtpub/java9/concurrency/cookbook/chapter05/recipe05/task/SearchNumberTask.java:78
Method
compute
Main method of the task. If the block of elements it has to process has 10 or more elements, it divides the block in two and executes two subtasks t
Chapter05/ch05_recipe04/src/com/packtpub/java9/concurrency/cookbook/chapter05/recipe04/task/Task.java:51
Method
compute
Main method of the task. It throws an additional FolderProcessor task for each folder in this folder. For each file in the folder, it compare its exte
Chapter05/ch05_recipe03/src/com/packtpub/java9/concurrency/cookbook/chapter05/recipe03/task/FolderProcessor.java:71
Method
compute
Method that implements the job of the task
Chapter05/ch05_recipe01/src/com/packtpub/java9/concurrency/cookbook/chapter05/recipe01/task/Task.java:55
Method
compute
If the task has to process more that ten lines, it divide the block of lines it two subblocks and throws two DocumentTask two process them. In other c
Chapter05/ch05_recipe02/src/com/packtpub/java9/concurrency/cookbook/chapter05/recipe02/task/DocumentTask.java:59
Method
compute
If the part of the line it has to process is smaller that 100, it calculates the number of appearances of the word in the block. Else, it divides the
Chapter05/ch05_recipe02/src/com/packtpub/java9/concurrency/cookbook/chapter05/recipe02/task/LineTask.java:60
Method
compute
Method that executes the action of the Task. It sleeps the thread during one second
Chapter10/ch10_recipe02/src/com/packtpub/java9/concurrency/cookbook/chapter10/recipe02/task/OneSecondLongTask.java:22
Method
compute
Main method of the task. If it has to process more that 100 elements, it divides that set it two sub-sets and creates two task to process them. Otherw
Chapter09/ch09_recipe04/src/com/packtpub/java9/concurrency/cookbook/chapter09/recipe04/forkjoin/Task.java:55
Method
compute
()
Chapter11/app_recipe12/src/com/packtpub/java9/concurrency/cookbook/appendix/recipe12/task/PersonMapTask.java:25
Method
compute
()
Chapter11/app_recipe08/src/com/packtpub/java9/concurrency/cookbook/appendix/recipe08/task/TaskFJ.java:17
Method
compute
Main method of the task. If the task has less than 100 elements to sum, it calculates the sum of these elements directly. Else, it creates two subtask
Chapter08/ch08_recipe06/src/com/packtpub/java9/concurrency/cookbook/chapter08/recipe06/task/MyRecursiveTask.java:49
Method
compute
Main method of the task. If the task has to increment less that 100 elements, it increments them directly. Else, it divides the operation in two subta
Chapter08/ch08_recipe07/src/com/packtpub/java9/concurrency/cookbook/chapter08/reciper07/task/Task.java:48
Method
decorateTask
Method that converts a RunnableScheduledFuture task in a MyScheduledTask task
Chapter08/ch08_recipe05/src/com/packtpub/java9/concurrency/cookbook/chapter08/recipe05/task/MyScheduledThreadPoolExecutor.java:27
Method
done
Method that is called when the task finish.
Chapter04/ch04_recipe08/src/com/packtpub/java9/concurrency/cookbook/chapter04/recipe08/task/ResultTask.java:30
Method
equals
(Object object)
Chapter06/ch06_recipe02/src/com/packtpub/java9/concurrency/cookbook/chapter06/recipe02/util/Person.java:129
← previous
next →
401–500 of 896, ranked by callers