Code example for EventBus

Methods: post

0
        props.setProperty("name", keyspace.getName());
        keyspace.setClusterName(clusterKey.getClusterName());
 
        try { 
            cluster.createKeyspace(props);
            eventBus.post(new KeyspaceUpdateEvent(new KeyspaceKey(clusterKey, keyspace.getName())));
        } catch (ConnectionException e) {
            throw new PaasException(String.format("Error creating keyspace '%s' from cluster '%s'", keyspace.getName(), clusterKey.getClusterName()), e);
        } 
    } 
     
    @Override 
    public void updateKeyspace(@PathParam("keyspace") String keyspaceName, KeyspaceEntity keyspace) throws PaasException {
        try { 
            if (keyspace.getOptions() == null) {
                return; // Nothing to do  
            } 
             
            // Add them as existing values to the properties object 
            Properties props = new Properties();