Skip to content
This repository was archived by the owner on Jun 20, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions fbpcs/infra/cloud_bridge/server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ plugins {
id 'org.springframework.boot' version '2.7.0'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
id 'io.freefair.lombok' version '5.1.0'
}

group = 'com.facebook'
Expand All @@ -39,6 +40,8 @@ dependencies {
implementation 'org.apache.commons:commons-lang3'
implementation platform('com.amazonaws:aws-java-sdk-bom:1.12.+')
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
compileOnly 'org.projectlombok:lombok:1.18.26'
annotationProcessor 'org.projectlombok:lombok:1.18.26'
}

test {
Expand Down
2 changes: 2 additions & 0 deletions fbpcs/infra/cloud_bridge/server/lombok.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This file is generated by the 'io.freefair.lombok' Gradle plugin
config.stopBubbling = true
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.business.cloudbridge.pl.server.deployment.cache;

import java.util.concurrent.ConcurrentHashMap;

public class ThreadSafeCache<K, V> {
private ConcurrentHashMap<K, V> map;

public ThreadSafeCache() {
map = new ConcurrentHashMap<K, V>();
}

public void put(K key, V value) {
map.put(key, value);
}

public V get(K key) {
return map.get(key);
}

public void remove(K key) {
map.remove(key);
}

public boolean containsKey(K key) {
return map.containsKey(key);
}

public int size() {
return map.size();
}

public void clear() {
map.clear();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.business.cloudbridge.pl.server.deployment.models;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class DeploymentMeta {
private String deploymentId;
private DeploymentStatus deploymentStatus;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.business.cloudbridge.pl.server.deployment.models;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum DeploymentStatus {
NOT_STARTED("NOT_STARTED"),
STARTED("STARTED"),
ERROR("ERROR"),
COMPLETED("COMPLETED");

private final String status;
}