use of org.apache.ignite.internal.managers.systemview.walker.Order in project gridgain by gridgain.
the class ComputeJobView method affinityCacheIds.
/**
* @return Comma separated list of cache identifiers or {@code null} for non affinity call.
*/
@Order(5)
public String affinityCacheIds() {
GridReservable res = job.getPartsReservation();
if (!(res instanceof GridJobProcessor.PartitionsReservation))
return null;
int[] ids = ((GridJobProcessor.PartitionsReservation) res).getCacheIds();
if (ids == null || ids.length == 0)
return null;
StringJoiner joiner = new StringJoiner(",");
for (int id : ids) joiner.add(Integer.toString(id));
return joiner.toString();
}
use of org.apache.ignite.internal.managers.systemview.walker.Order in project ignite by apache.
the class ComputeJobView method affinityCacheIds.
/**
* @return Comma separated list of cache identifiers or {@code null} for non affinity call.
*/
@Order(5)
public String affinityCacheIds() {
GridReservable res = job.getPartsReservation();
if (!(res instanceof GridJobProcessor.PartitionsReservation))
return null;
int[] ids = ((GridJobProcessor.PartitionsReservation) res).getCacheIds();
if (ids == null || ids.length == 0)
return null;
StringJoiner joiner = new StringJoiner(",");
for (int id : ids) joiner.add(Integer.toString(id));
return joiner.toString();
}
use of org.apache.ignite.internal.managers.systemview.walker.Order in project ignite by apache.
the class TransactionView method cacheIds.
/**
* @return Id of the cashes participating in transaction.
* @see IgniteTxState#cacheIds()
*/
@Order(8)
public String cacheIds() {
GridIntList cacheIds = tx.txState().cacheIds();
if (cacheIds == null)
return null;
int sz = cacheIds.size();
if (sz == 0)
return null;
// GridIntList is not synchronized. If we fail while iterating just ignore.
try {
SB b = new SB();
for (int i = 0; i < sz; i++) {
if (i != 0)
b.a(',');
b.a(cacheIds.get(i));
}
return b.toString();
} catch (Throwable e) {
return null;
}
}
use of org.apache.ignite.internal.managers.systemview.walker.Order in project gridgain by gridgain.
the class TransactionView method cacheIds.
/**
* @return Id of the cashes participating in transaction.
* @see IgniteTxState#cacheIds()
*/
@Order(8)
public String cacheIds() {
GridIntList cacheIds = tx.txState().cacheIds();
if (cacheIds == null)
return null;
int sz = cacheIds.size();
if (sz == 0)
return null;
// GridIntList is not synchronized. If we fail while iterating just ignore.
try {
SB b = new SB();
for (int i = 0; i < sz; i++) {
if (i != 0)
b.a(',');
b.a(cacheIds.get(i));
}
return b.toString();
} catch (Throwable e) {
return null;
}
}
Aggregations