public interface ObjectStorage
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
delete(String path)
Delete a path from the object storage if exists.
|
boolean |
exists(String path)
Checks if a path exists into the object storage.
|
Path |
getPath(String first,
String... path)
Return a path based on the filesystem that is implemented for storage
|
void |
init(URI rootURI)
Initialize the object storage.
|
<T> T |
read(String path)
Read the content of the path given
|
<T> void |
write(String path,
T value)
Write an object into the object storage.
|
<T> void |
write(String path,
T value,
boolean lock)
Write an object into the object storage.
|
void init(URI rootURI)
rootURI
- The root URI where is going to create the file systemboolean exists(String path)
path
- the path to the stored object.<T> T read(String path)
path
- The path where the content is stored<T> void write(String path, T value)
path
- The path where the object is going to be writtenvalue
- The object itself<T> void write(String path, T value, boolean lock)
path
- The path where the object is going to be writtenvalue
- The object itselflock
- If the object storage should be locked while writingvoid delete(String path)
path
- The path to deletePath getPath(String first, String... path)
first
- the path string or initial part of the path stringpath
- additional strings to be joined to form the path stringvoid close()
Copyright © 2012–2019 JBoss by Red Hat. All rights reserved.