Tuesday, December 31, 2019

OpenID, OIDC, OAuth, OAuth2

https://en.wikipedia.org/wiki/OpenID


https://en.wikipedia.org/wiki/OpenID_Connect

https://en.wikipedia.org/wiki/OAuth

https://en.wikipedia.org/wiki/OAuth#OAuth_2.0



java 11 certifications 1Z0-815 1Z0-816

https://education.oracle.com/oracle-certified-professional-java-se-11-developer/trackp_815


https://www.oracle.com/a/ocom/img/dc/ww-java11-programmer-study-guide.pdf?intcmp=WWOUCERTBLOGBBTYJK050219

https://javarevisited.blogspot.com/2019/07/top-4-java-11-certification-free-mock-exams-practice-tests-ocajp11-ocpjp11-1z0-815-16-questions.html

https://www.baeldung.com/java-9-modularity

unnamed module https://www.logicbig.com/tutorials/core-java-tutorial/modules/unnamed-modules.html



Collections

https://dzone.com/articles/the-best-of-java-collections-tutorials


http://falkhausen.de/Java-10/java.util/Collection-Hierarchy.html hyerarchy

https://dzone.com/articles/a-deep-dive-into-collections

https://dzone.com/articles/the-developers-guide-to-collections-lists

https://dzone.com/articles/the-developers-guide-to-collections-sets

https://dzone.com/articles/the-developers-guide-to-collections-queues



Functional Interfaces

The Supplier interface is a generic functional interface with a single method that has no arguments and returns a value of a parameterized type.

The Consumer functional interface. Its single method takes a parameter and returns void.

The Function represents a function that accepts one argument and produces a result.



BiFunction represents a function that accepts two arguments and produces a result. This is the two-arity specialization of Function.


BinaryOperator Represents an operation upon two operands of the same type, producing a result of the same type as the operands.


(freely extracted from https://www.baeldung.com/java-completablefuture

and from https://www.baeldung.com/java-bifunction-interface


)




Friday, December 27, 2019

LinkedBlockingQueue

import java.util.concurrent.LinkedBlockingQueue;

public class MyLinkedBlockingQueue {
    public static void main(String[] args) throws InterruptedException {
        LinkedBlockingQueue  linkedBlockingQueue = new LinkedBlockingQueue();
        linkedBlockingQueue.put("PIPPO");
        linkedBlockingQueue.put("PLUTO");
        System.out.println(linkedBlockingQueue);
        Object bla1 = linkedBlockingQueue.peek();
        System.out.println(bla1);
        Object bla2 = linkedBlockingQueue.take();
        System.out.println(bla2);
        Object bla3 = linkedBlockingQueue.take();
        System.out.println(bla3);
        Object bla4 = linkedBlockingQueue.take();
        System.out.println(bla4);

        System.out.println(linkedBlockingQueue);
    }
}



the output is:

[PIPPO, PLUTO]
PIPPO // this is the peek
PIPPO // this is the first take
PLUTO // this is the second take

and then at bla4 it blocks, because the Queue is empty...waiting for someone to put something into it...

https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/LinkedBlockingQueue.html




Sunday, December 15, 2019

Collections

https://dzone.com/articles/the-best-of-java-collections-tutorials


http://falkhausen.de/Java-10/java.util/Collection-Hierarchy.html hyerarchy

https://dzone.com/articles/a-deep-dive-into-collections

https://dzone.com/articles/the-developers-guide-to-collections-lists

https://dzone.com/articles/the-developers-guide-to-collections-sets

https://dzone.com/articles/the-developers-guide-to-collections-queues