File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -27,14 +27,15 @@ generally have to go through an explicit cast:
27
27
import com.datastax.oss.driver.api.core.context.DriverContext ;
28
28
29
29
import com.datastax.oss.driver.internal.core.context.InternalDriverContext ;
30
- import com.datastax.oss.driver.internal.core.config.ForceReloadConfigEvent ;
30
+ import com.datastax.oss.driver.internal.core.metadata.TopologyEvent ;
31
31
32
32
// Public API:
33
33
DriverContext context = session. getContext();
34
34
35
- // Switch to the internal API to force a reload of the configuration :
35
+ // Switch to the internal API to force a node down :
36
36
InternalDriverContext internalContext = (InternalDriverContext ) context;
37
- internalContext. getEventBus(). fire(ForceReloadConfigEvent . INSTANCE );
37
+ InetSocketAddress address = new InetSocketAddress (" 127.0.0.1" , 9042 );
38
+ internalContext. getEventBus(). fire(TopologyEvent . forceDown(address));
38
39
```
39
40
40
41
So the risk of unintentionally using the internal API is very low. To double-check, you can always
You can’t perform that action at this time.
0 commit comments