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
putVal(int XORHash, K key, V value, boolean onlyIfAbsent, boolean evict) { | |
1. Node<K,V> 테이블이 없다면 초기화 | |
2. 테이블의 [ 테이블 길이 -1 & XORHash ] 인덱스 Value가 null 이라면 | |
- 테이블의 [ 테이블 길이 -1 & XORHash ] 인덱스에 newNode(새로운 노드 생성) 넣음 | |
3. 2번이 아니라면 | |
테이블의 [ 테이블 길이 -1 & XORHash ] 인덱스의 Node 값 참조 | |
3-1. (Node의 hash 가 파라미터 XORHash 같고 Node의 key 가 파라미터 키와 같음) or (노드의 key 가 파라미터 key 와 equals true) |
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
/* | |
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. | |
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. | |
* | |
* | |
* | |
* | |
* | |
* | |
* |
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
@Id | |
@GeneratedValue(strategy= GenerationType.TABLE, generator = "string_prefix_generator") | |
@GenericGenerator(name = "string_prefix_generator", strategy = "com.circlee7.test.util.StringPrefixTableGenerator", parameters = { | |
@Parameter(name = "table_name", value = "new_key_numbers"), | |
@Parameter(name = "value_column_name", value = "key_number"), | |
@Parameter(name = "segment_column_name", value = "name"), | |
@Parameter(name = "segment_value", value = "names_key"), | |
@Parameter(name = "prefix_key", value = "prg")}) | |
private String id; |
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
import org.hibernate.MappingException; | |
import org.hibernate.engine.spi.SharedSessionContractImplementor; | |
import org.hibernate.id.enhanced.TableGenerator; | |
import org.hibernate.internal.util.config.ConfigurationHelper; | |
import org.hibernate.service.ServiceRegistry; | |
import org.hibernate.type.StandardBasicTypes; | |
import org.hibernate.type.Type; | |
import java.io.Serializable; | |
import java.util.Properties; |
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
@Bean | |
WebSocketHandlerAdapter getWebsocketHandlerAdapter(){ | |
HandshakeWebSocketService handshakeWebSocketService = new HandshakeWebSocketService(); | |
handshakeWebSocketService.setSessionAttributePredicate( k -> true); | |
WebSocketHandlerAdapter wsha = new WebSocketHandlerAdapter(handshakeWebSocketService){ | |
@Override | |
public Mono<HandlerResult> handle(ServerWebExchange exchange, Object handler) { |
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
import java.time.LocalDateTime; | |
import java.time.format.DateTimeFormatter; | |
import java.util.*; | |
import java.util.stream.Collectors; | |
public class LocalDateTimeRange<T> { | |
enum EDGE { | |
START, END |
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
import java.time.LocalDateTime; | |
import java.time.format.DateTimeFormatter; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.concurrent.ConcurrentHashMap; | |
import java.util.function.Function; | |
import java.util.function.Predicate; | |
import java.util.stream.Collectors; |
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
import java.time.LocalDateTime; | |
import java.time.format.DateTimeFormatter; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.concurrent.ConcurrentHashMap; | |
import java.util.function.Function; | |
import java.util.function.Predicate; | |
import java.util.stream.Collectors; |
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
public synchronized Set<String> refreshEnvironment() { | |
Map<String, Object> before = extract( | |
this.context.getEnvironment().getPropertySources()); | |
addConfigFilesToEnvironment(); | |
Set<String> keys = changes(before, | |
extract(this.context.getEnvironment().getPropertySources())).keySet(); | |
this.context.publishEvent(new EnvironmentChangeEvent(this.context, keys)); | |
return keys; | |
} |
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
/* | |
* Copyright 2012-2019 the original author or authors. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |