public static InternalLogWriter getStaticInternalLogWriter() { InternalDistributedSystem sys = getAnyInstance(); if (sys != null) { return sys.logWriter; } return null; }
@Override public DistributedSystem getDistributedSystem() { if (myDs == null) { return InternalDistributedSystem.getAnyInstance(); } return myDs; }
/** * @return a log writer, or null if there is no distributed system available */ public static LogWriter getLogger() { InternalDistributedSystem sys = getAnyInstance(); if (sys != null && sys.logWriter != null) { return sys.logWriter; } return null; }
public static InternalLogWriter getStaticSecurityInternalLogWriter() { InternalDistributedSystem sys = getAnyInstance(); if (sys != null) { return sys.securityLogWriter; } return null; }
public InternalLogWriter getSecurityInternalLogWriter() { InternalDistributedSystem sys = getAnyInstance(); if (sys != null) { return sys.securityLogWriter; } return null; }
private static Object getSource() { Object source = SOURCE.get(); if (source == null) { source = InternalDistributedSystem.getAnyInstance().getMemberId(); } return source; }
/** * @return distribution stats, or null if there is no distributed system available */ public static DMStats getDMStats() { InternalDistributedSystem sys = getAnyInstance(); if (sys != null && sys.dm != null) { return sys.dm.getStats(); } return null; }
@Override public String toString() { return "Set alerts refresh time interval in " + InternalDistributedSystem.getAnyInstance().getDistributedMember(); } }
protected synchronized void fileDescriptorsExhausted() { if (!ulimitWarningIssued) { ulimitWarningIssued = true; logger.fatal( "This process is out of file descriptors.This will hamper communications and slow down the system.Any conserve-sockets setting is now being ignored.Please consider raising the descriptor limit.This alert is only issued once per process."); InternalDistributedSystem.getAnyInstance().setShareSockets(true); threadWantsOwnResources = new ThreadLocal(); } }
@Override public boolean isPresent() { InternalDistributedSystem sys = InternalDistributedSystem.getAnyInstance(); if (sys == null) { throw new IllegalStateException( "isPresent requires a connection to the distributed system."); } DistributionManager dm = sys.getDistributionManager(); return dm.isRolePresent(this); }
@Override public int getCount() { InternalDistributedSystem sys = InternalDistributedSystem.getAnyInstance(); if (sys == null) { throw new IllegalStateException( "getCount requires a connection to the distributed system."); } DistributionManager dm = sys.getDistributionManager(); return dm.getRoleCount(this); }
@AfterClass public static void afterClass() { InternalDistributedSystem ids = InternalDistributedSystem.getAnyInstance(); if (ids != null) { ids.disconnect(); } }
public HighPriorityAckedMessage() { super(); InternalDistributedSystem ds = InternalDistributedSystem.getAnyInstance(); if (ds != null) { this.originDm = (ClusterDistributionManager) ds.getDistributionManager(); } if (this.originDm != null) { this.id = this.originDm.getDistributionManagerId(); } }
public static EventID generateEventId() { InternalCache cache = GemFireCacheImpl.getInstance(); if (cache == null) { // A cache has not yet created return null; } return new EventID(InternalDistributedSystem.getAnyInstance()); }
/** * Sets the EventID to the instantiator if distributed system is created */ public static EventID generateEventId() { InternalCache cache = GemFireCacheImpl.getInstance(); if (cache == null) { // A cache has not yet created return null; } return new EventID(InternalDistributedSystem.getAnyInstance()); }
public SerialAckedMessage() { super(); InternalDistributedSystem ds = InternalDistributedSystem.getAnyInstance(); if (ds != null) { // this constructor is used in serialization as well as when sending to others this.originDm = (ClusterDistributionManager) ds.getDistributionManager(); this.id = this.originDm.getDistributionManagerId(); } }
public static FunctionStats getFunctionStats(String functionID) { if (isDisabled()) { return dummy; } else { InternalDistributedSystem ds = InternalDistributedSystem.getAnyInstance(); return ds.getFunctionStats(functionID); } }
@Override public void releaseQuorumChecker(QuorumChecker checker) { checker.suspend(); InternalDistributedSystem system = InternalDistributedSystem.getAnyInstance(); if (system == null || !system.isConnected()) { checker.close(); } }
@Override public void execute(FunctionContext context) { InternalDistributedSystem instance = InternalDistributedSystem.getAnyInstance(); if (instance == null) { context.getResultSender().lastResult(new HashSet()); return; } InternalDistributedMember member = instance.getDistributedMember(); Set<Dependency> dependencies = DeadlockDetector.collectAllDependencies(member); context.getResultSender().lastResult((Serializable) dependencies); }
private void executeAlwaysException(FunctionContext context) { DistributedSystem ds = InternalDistributedSystem.getAnyInstance(); LogWriter logger = ds.getLogWriter(); logger.fine("Executing executeException in TestFunction on Member : " + ds.getDistributedMember() + "with Context : " + context); logger.fine("MyFunctionExecutionException Exception is intentionally thrown"); throw new MyFunctionExecutionException("I have been thrown from TestFunction"); }