use of org.apache.geode.internal.cache.ClientServerObserverAdapter in project geode by apache.
the class ClientServerForceInvalidateDUnitTest method cleanupObserver.
private static void cleanupObserver() {
CacheClientProxy.AFTER_MESSAGE_CREATION_FLAG = false;
ClientServerObserverHolder.setInstance(new ClientServerObserverAdapter());
}
use of org.apache.geode.internal.cache.ClientServerObserverAdapter in project geode by apache.
the class DurableClientTestCase method setBridgeObeserverForAfterPrimaryRecovered.
public static void setBridgeObeserverForAfterPrimaryRecovered() {
DurableClientTestCase.isPrimaryRecovered = false;
PoolImpl.AFTER_PRIMARY_RECOVERED_CALLBACK_FLAG = true;
ClientServerObserver bo = ClientServerObserverHolder.setInstance(new ClientServerObserverAdapter() {
public void afterPrimaryRecovered(ServerLocation location) {
DurableClientTestCase.isPrimaryRecovered = true;
PoolImpl.AFTER_PRIMARY_RECOVERED_CALLBACK_FLAG = false;
}
});
}
use of org.apache.geode.internal.cache.ClientServerObserverAdapter in project geode by apache.
the class HASlowReceiverDUnitTest method setBridgeObeserverForAfterQueueDestroyMessage.
public static void setBridgeObeserverForAfterQueueDestroyMessage() throws Exception {
PoolImpl.AFTER_QUEUE_DESTROY_MESSAGE_FLAG = true;
ClientServerObserverHolder.setInstance(new ClientServerObserverAdapter() {
@Override
public void afterQueueDestroyMessage() {
clientVM.invoke(() -> HASlowReceiverDUnitTest.checkRedundancyLevel(new Integer(0)));
isUnresponsiveClientRemoved = true;
PoolImpl.AFTER_QUEUE_DESTROY_MESSAGE_FLAG = false;
}
});
}
use of org.apache.geode.internal.cache.ClientServerObserverAdapter in project geode by apache.
the class HAInterestTestCase method setClientServerObserverForAfterRegistration.
public static void setClientServerObserverForAfterRegistration(final VM vm) {
PoolImpl.AFTER_REGISTER_CALLBACK_FLAG = true;
ClientServerObserverHolder.setInstance(new ClientServerObserverAdapter() {
public void afterInterestRegistration() {
synchronized (HAInterestTestCase.class) {
vm.invoke(() -> HAInterestTestCase.startServer());
HAInterestTestCase.isAfterRegistrationCallbackCalled = true;
HAInterestTestCase.class.notify();
PoolImpl.AFTER_REGISTER_CALLBACK_FLAG = false;
}
}
});
}
use of org.apache.geode.internal.cache.ClientServerObserverAdapter in project geode by apache.
the class HAStartupAndFailoverDUnitTest method unSetClientServerObserver.
public static void unSetClientServerObserver() {
synchronized (HAStartupAndFailoverDUnitTest.class) {
PoolImpl.AFTER_PRIMARY_IDENTIFICATION_FROM_BACKUP_CALLBACK_FLAG = false;
HAStartupAndFailoverDUnitTest.identifiedPrimary = false;
ClientServerObserverHolder.setInstance(new ClientServerObserverAdapter());
}
}
Aggregations