Coexistence of Kotlin and Java, calling kotlin code in -Java

Call of kotlin data class Call of object simple profit mode class in Kotlin Calling file class in Kotlin Flexible transfer of parameters by calling jvm annotation String string null call Call of kotlin data class kotlin Code: package com.tianfu.kotlin /** * age Member annotations cannot have get and ...

Posted by imranlink on Wed, 08 Jul 2020 18:01:49 +0200

Collect Cache Persist of Spark cache

  All of them have the function of gathering data and pulling data storage. mark their respective roles. Collect: /** * Return an array that contains all of the elements in this RDD. * * @note This method should only be used if the resulting array is expected to be small, as * all the data is loaded into the driver's memory. ...

Posted by Brian W on Tue, 30 Jun 2020 05:44:38 +0200

Chapter 13: concurrent deadlock and enterprise solutions (deadlock, livelock, starvation)

1. What is a deadlock? What's the harm? 1.1 what is deadlock? Occurs in concurrency [mutually exclusive]: when two (or more) threads (or processes) hold each other's resources required by each other, but do not actively release them, all of them can't move forward, resulting in endless blocking o ...

Posted by ollmorris on Mon, 29 Jun 2020 08:23:19 +0200

27 - how many ways to implement a single example? What are their advantages and disadvantages?

Singleton pattern is one of the simplest design patterns in Java. It means that a class always has only one instance during its running. We call it singleton pattern. It is not only used in practical work, but also one of the most frequently tested questions in interview. Through the singleton mode, we ...

Posted by vbracknell on Tue, 23 Jun 2020 10:58:01 +0200

Android Binder-framework->native(transact->onTransact)

Previous Binder mRemote's Past and Present PowerManger.isScreenOnThe calling process for () has already been called BinderProxy.transact(); /frameworks/base/core/java/android/os/Binder.java ------> Binder.java->BinderProxy public boolean transact(int code, Parcel data, Parcel reply, int flags) throws Remote ...

Posted by Ajita on Thu, 18 Jun 2020 03:26:45 +0200

Java records of strong reference, soft reference, weak reference and virtual reference (Practical)

First of all, don't be afraid of some nouns. In fact, they are all reasonable things. The reference itself is well understood. The reference type data stores the memory address of the actual object. When garbage collection, it depends on whether the object has a reference. Java does not need developers to allocate memory and free memory, but it ...

Posted by rdawson on Sun, 14 Jun 2020 09:58:30 +0200

A Probe into Davids'Principles: Dubbo Service Exposure, Consumption and Elegant Downtime Principles

Article Directory Dubbo Service Exposure and Service Consumption Principles (Based on Dubbo 2.6.5) Configuration parsing principles Based on XML Configuration Parsing Principle schema module description Configuration parsing principles based on annotations @EnableDubbo Role of ServiceAnnotationBe ...

Posted by cyronuts on Fri, 12 Jun 2020 04:06:57 +0200

akka-typed - cluster: group router, cluster-load-balancing

Let's start with the router actor for akka-typed.route is divided into pool router and group router.Let's first look at a demonstration of using pool-router: val pool = Routers.pool(poolSize = 4)( // make sure the workers are restarted if they fail Behaviors.supervise(WorkerRoutee()).onFailure[Exception](SupervisorStrateg ...

Posted by scnjl on Thu, 11 Jun 2020 03:02:18 +0200

Changes of JDK8 in generic type derivation

This article comes from: PerfMa technology community Perfma official website summary JDK8 upgrade, most of the problems may be encountered in the compile time, but sometimes it is more painful, there is no problem in the compile time, but there is a problem in the run time, such as today's topic, so when you upgrade, you still need to test mo ...

Posted by Random on Tue, 09 Jun 2020 09:26:58 +0200

Java multithreading: a new understanding of threads

preface For Java multithreading, in fact, it has been some scattered learning. Multithreading is often asked in the interview. I really want to summarize this certification this time, and I really don't want to fall in this field. According to "Java high concurrent programming details" a boo ...

Posted by coolbeansdude51 on Thu, 04 Jun 2020 15:32:41 +0200