Package org.simgrid.msg
Class Storage
- java.lang.Object
-
- org.simgrid.msg.Storage
-
public class Storage extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
name
Storage name
-
Constructor Summary
Constructors Constructor Description Storage()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Storage[]
all()
This static method returns all of the storages of the installed platform.static Storage
getByName(java.lang.String name)
This static method gets a storage instance associated with a native storage of your platform.long
getFreeSize()
This method returns the free size (in bytes) of a storage element.java.lang.String
getHost()
Returns the host name the storage is attached tojava.lang.String
getName()
This method returns the name of a storage.java.lang.String
getProperty(java.lang.String name)
Returns the value of a given storage property.long
getSize()
This method returns the size (in bytes) of a storage element.long
getUsedSize()
This method returns the used size (in bytes) of a storage element.static void
nativeInit()
Class initializer, to initialize various JNI stuffvoid
setProperty(java.lang.String name, java.lang.String value)
Change the value of a given storage property.java.lang.String
toString()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getByName
public static Storage getByName(java.lang.String name) throws HostNotFoundException, StorageNotFoundException
This static method gets a storage instance associated with a native storage of your platform. This is the best way to get a java storage object.- Parameters:
name
- The name of the storage to get.- Returns:
- The storage object with the given name.
- Throws:
StorageNotFoundException
- if the name of the storage is not valid.HostNotFoundException
-
getName
public java.lang.String getName()
This method returns the name of a storage.- Returns:
- The name of the storage.
-
getSize
public long getSize()
This method returns the size (in bytes) of a storage element.- Returns:
- The size (in bytes) of the storage element.
-
getFreeSize
public long getFreeSize()
This method returns the free size (in bytes) of a storage element.- Returns:
- The free size (in bytes) of the storage element.
-
getUsedSize
public long getUsedSize()
This method returns the used size (in bytes) of a storage element.- Returns:
- The used size (in bytes) of the storage element.
-
getProperty
public java.lang.String getProperty(java.lang.String name)
Returns the value of a given storage property.
-
setProperty
public void setProperty(java.lang.String name, java.lang.String value)
Change the value of a given storage property.
-
getHost
public java.lang.String getHost()
Returns the host name the storage is attached to- Returns:
- the host name the storage is attached to
-
all
public static Storage[] all()
This static method returns all of the storages of the installed platform.- Returns:
- An array containing all the storages installed.
-
nativeInit
public static void nativeInit()
Class initializer, to initialize various JNI stuff
-
-