forked from docker-java/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPropagationMode.java
More file actions
50 lines (41 loc) · 1017 Bytes
/
Copy pathPropagationMode.java
File metadata and controls
50 lines (41 loc) · 1017 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package com.github.dockerjava.api.model;
/**
* The propagation mode of a file system or file: <code>shared</code>, <code>slave</code> or <code>private</code>.
*
* @see https://github.com/docker/docker/pull/17034
* @since 1.22
*/
public enum PropagationMode {
/** default */
DEFAULT(""),
/** shared */
SHARED("shared"),
/** slave */
SLAVE("slave"),
/** private */
PRIVATE("private");
/**
* The default {@link PropagationMode}: {@link #DEFAULT}
*/
public static final PropagationMode DEFAULT_MODE = DEFAULT;
private String value;
PropagationMode(String v) {
value = v;
}
@Override
public String toString() {
return value;
}
public static PropagationMode fromString(String v) {
switch (v) {
case "shared":
return SHARED;
case "slave":
return SLAVE;
case "private":
return PRIVATE;
default:
return DEFAULT;
}
}
}