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.StringnameStorage 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 StoragegetByName(java.lang.String name)This static method gets a storage instance associated with a native storage of your platform.longgetFreeSize()This method returns the free size (in bytes) of a storage element.java.lang.StringgetHost()Returns the host name the storage is attached tojava.lang.StringgetName()This method returns the name of a storage.java.lang.StringgetProperty(java.lang.String name)Returns the value of a given storage property.longgetSize()This method returns the size (in bytes) of a storage element.longgetUsedSize()This method returns the used size (in bytes) of a storage element.static voidnativeInit()Class initializer, to initialize various JNI stuffvoidsetProperty(java.lang.String name, java.lang.String value)Change the value of a given storage property.java.lang.StringtoString()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin 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
-
-