public class Rados extends RadosBase
| Modifier and Type | Field and Description |
|---|---|
protected com.sun.jna.Pointer |
clusterPtr |
| Constructor and Description |
|---|
Rados()
Construct a RADOS Object which invokes rados_create
|
Rados(String id)
Construct a RADOS Object which invokes rados_create
|
Rados(String clustername,
String name,
long flags)
Construct a RADOS Object which invokes rados_create2
|
| Modifier and Type | Method and Description |
|---|---|
String |
clusterFsid()
Get the cluster's fsid
|
RadosClusterInfo |
clusterStat()
Get the cluster stats
|
String |
confGet(String option)
Retrieve a RADOS configuration option's value
|
void |
confReadFile(File file)
Read a Ceph configuration file
|
void |
confSet(String option,
String value)
Set a RADOS configuration option
|
void |
connect()
Connect to the Ceph cluster
|
void |
finalize()
Finalize the Rados connection
|
long |
getInstanceId()
Get the global unique ID of the current connection
|
static int[] |
getVersion()
Get the librados version
|
IoCTX |
ioCtxCreate(String pool)
Create a IoCTX
|
void |
ioCtxDestroy(IoCTX io)
Destroy a IoCTX
|
void |
poolCreate(String name)
Create a RADOS pool
|
void |
poolCreate(String name,
long auid)
Create a RADOS pool and set a auid
|
void |
poolCreate(String name,
long auid,
long crushrule)
Create a RADOS pool and set a auid and crushrule
|
void |
poolDelete(String name)
Delete a RADOS pool
|
String[] |
poolList()
List all the RADOS pools
|
long |
poolLookup(String name)
Get the ID of a RADOS pool
|
String |
poolReverseLookup(long id)
Get the name of a RADOS pool
|
void |
shutDown()
Shuts rados down
|
handleReturnCodepublic Rados(String id)
id - the cephx id to authenticate withpublic Rados(String clustername, String name, long flags)
clustername - The name of the cluster (usually "ceph").name - The name of the user (e.g., client.admin, client.user)flags - Flag options (future use).public Rados()
public void confReadFile(File file) throws RadosException
file - A file object with the path to a ceph.confRadosExceptionpublic void confSet(String option, String value) throws RadosException
option - the name of the optionvalue - the value configuration valueRadosExceptionpublic String confGet(String option) throws RadosException
option - the name of the optionRadosExceptionpublic void connect()
throws RadosException
RadosExceptionpublic String clusterFsid() throws RadosException
RadosExceptionpublic RadosClusterInfo clusterStat() throws RadosException
RadosExceptionpublic void poolCreate(String name) throws RadosException
name - the name of the pool to be createdRadosExceptionpublic void poolCreate(String name, long auid) throws RadosException
name - the name of the pool to be createdauid - the owner ID for the new poolRadosExceptionpublic void poolCreate(String name, long auid, long crushrule) throws RadosException
name - the name of the pool to be createdauid - the owner ID for the new poolcrushrule - the crushrule for this poolRadosExceptionpublic void poolDelete(String name) throws RadosException
name - the name of the pool to be deletedRadosExceptionpublic void finalize()
throws Throwable
public String[] poolList() throws RadosException
RadosExceptionpublic long poolLookup(String name) throws RadosException
name - The name of the poolRadosExceptionpublic String poolReverseLookup(long id) throws RadosException
id - The id of the poolRadosExceptionpublic IoCTX ioCtxCreate(String pool) throws RadosException
pool - The name of the RADOS poolRadosExceptionpublic void ioCtxDestroy(IoCTX io)
io - A IoCTX objectpublic long getInstanceId()
throws RadosException
RadosExceptionpublic static int[] getVersion()
public void shutDown()
Copyright © 2015. All rights reserved.