public class IgfsUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
doInTransactionWithRetries(IgniteInternalCache cache,
IgniteOutClosureX<T> clo)
Performs an operation with transaction with retries.
|
static String |
fixUserName(String user)
Provides non-null user name.
|
static IgfsException |
newIgfsException(Class<? extends IgfsException> cls,
String msg,
Throwable cause)
Construct new IGFS exception passing specified message and cause.
|
static IgfsException |
toIgfsException(Exception err)
Converts any passed exception to IGFS exception.
|
public static IgfsException toIgfsException(Exception err)
err - Initial exception.public static IgfsException newIgfsException(Class<? extends IgfsException> cls, String msg, Throwable cause)
cls - Class.msg - Message.cause - Cause.public static String fixUserName(@Nullable String user)
FileSystemConfiguration.DFLT_USER_NAME,
which is the current process owner user.user - a user name to be fixed.public static <T> T doInTransactionWithRetries(IgniteInternalCache cache, IgniteOutClosureX<T> clo) throws IgniteCheckedException
cache - Cache to do the transaction on.clo - Closure.IgniteCheckedException - If failed.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.4.0 Release Date : September 24 2015