public class ObjectStorageImpl extends Object implements ObjectStorage
Constructor and Description |
---|
ObjectStorageImpl(IOService ioService) |
Modifier and Type | Method and Description |
---|---|
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... paths)
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.
|
@Inject public ObjectStorageImpl(@Named(value="configIO") IOService ioService)
public void init(URI rootURI)
ObjectStorage
init
in interface ObjectStorage
rootURI
- The root URI where is going to create the file systempublic boolean exists(String path)
ObjectStorage
exists
in interface ObjectStorage
path
- the path to the stored object.public <T> T read(String path)
ObjectStorage
read
in interface ObjectStorage
path
- The path where the content is storedpublic <T> void write(String path, T value)
ObjectStorage
write
in interface ObjectStorage
path
- The path where the object is going to be writtenvalue
- The object itselfpublic void delete(String path)
ObjectStorage
delete
in interface ObjectStorage
path
- The path to deletepublic Path getPath(String first, String... paths)
ObjectStorage
getPath
in interface ObjectStorage
first
- the path string or initial part of the path stringpaths
- additional strings to be joined to form the path stringCopyright © 2012–2019 JBoss by Red Hat. All rights reserved.