1
1
Nathaniel Graham c4d70ab425 Fix Java related warnings
This commit fixes java related warnings.

Fixes 

Signed-off-by: Nathaniel Graham <ngraham@lanl.gov>
2015-10-21 17:14:25 -07:00

41 строка
606 B
Java

package shmem;
/**
* Symmetric work array.
*/
public final class PSync
{
private long handle;
/**
* Allocates a symmetric work array.
* @param size Number of elements in the work array.
* @throws ShMemException Allocation error.
*/
public PSync(int size) throws ShMemException
{
handle = newPSync(size);
if(handle == 0)
throw new ShMemException("Allocation error.");
}
private native long newPSync(int size);
/**
* Frees a work array.
*/
public void free()
{
free(handle);
}
private native void free(long handle);
protected long addr()
{
return handle;
}
} // PSync