JerseyClientConfiguration clientConfig = ...;
String clientName = "PaymentAPIClient";
String baseUrl = "http://the-host/the-path";
JerseyClientBuilder clientBuilder = new JerseyClientBuilder(environment)
.using(clientConfig)
.withProvider(new CorrelationIdClientRequestFilter())
.withProvider(new LoggingFeature(
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE product ( | |
id UUID PRIMARY KEY, | |
name VARCHAR(64) NOT NULL, | |
-- max 999999.9999 | |
price_amount NUMERIC(10, 4) NOT NULL CHECK (price_amount >= 0), | |
price_currency VARCHAR(10) NOT NULL, | |
created_at TIMESTAMP WITH TIME ZONE NOT NULL, | |
updated_at TIMESTAMP WITH TIME ZONE NULL | |
); |
https://kubernetes.io/docs/tutorials
K8S master node(single in the cluster) has three processes kube-apiserver
, kube-controller-manager
and kube-scheduler
.
K8S non-master nodes have two processes kubelet
(talks to master), kube-proxy
(access cluster)
Basic Objects
DB Client 1
-- row 2 is locked
SELECT * FROM t_demo WHERE id=2 FOR UPDATE;
DB Client 2: BAD performace
Use Mockito V2, V1 does not support mocking final/static.
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.25.1</version>
</dependency>
Key:
- Don't use PATCH OR use it the right way
- PATCH is not to replace POST or PUT
- PATCH applies a delta rather than replacing the entire resource
- PATCH is of a different content-type
PUT
's payload is considered to be a modified version of the resource stored on the origin server, so the client is to replace itPATCH
's payload contains a set of instructions about how to modify the resource on the origin server, so to produce a new version- You can use whatever format you want as “description of changes”
The phenomena which are prohibited at various levels are:
A transaction reads data written by a concurrent uncommitted transaction.
A transaction re-reads data it has previously read and finds that data has been modified by another transaction (that committed since the initial read).
BindingProvider bindingProvider = (BindingProvider) port;
bindingProvider.getRequestContext().put(
BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"https://blah/blah/blah");