use of mondrian.rolap.RolapConnection in project mondrian by pentaho.
the class MondrianOlap4jMember method getChildMembers.
public NamedList<MondrianOlap4jMember> getChildMembers() throws OlapException {
final RolapConnection conn = olap4jSchema.olap4jCatalog.olap4jDatabaseMetaData.olap4jConnection.getMondrianConnection();
final List<mondrian.olap.Member> children = Locus.execute(conn, "MondrianOlap4jMember.getChildMembers", new Locus.Action<List<mondrian.olap.Member>>() {
public List<mondrian.olap.Member> execute() {
return conn.getSchemaReader().getMemberChildren(member);
}
});
return new AbstractNamedList<MondrianOlap4jMember>() {
public String getName(Object member) {
return ((MondrianOlap4jMember) member).getName();
}
public MondrianOlap4jMember get(int index) {
return new MondrianOlap4jMember(olap4jSchema, children.get(index));
}
public int size() {
return children.size();
}
};
}
use of mondrian.rolap.RolapConnection in project mondrian by pentaho.
the class Execution method fireExecutionStartEvent.
private void fireExecutionStartEvent() {
final RolapConnection connection = statement.getMondrianConnection();
final MondrianServer server = connection.getServer();
server.getMonitor().sendEvent(new ExecutionStartEvent(startTimeMillis, server.getId(), connection.getId(), statement.getId(), id, getMdx()));
}
use of mondrian.rolap.RolapConnection in project mondrian by pentaho.
the class Execution method tracePhase.
public void tracePhase(int hitCount, int missCount, int pendingCount) {
final RolapConnection connection = statement.getMondrianConnection();
final MondrianServer server = connection.getServer();
final int hitCountInc = hitCount - this.cellCacheHitCount;
final int missCountInc = missCount - this.cellCacheMissCount;
final int pendingCountInc = pendingCount - this.cellCachePendingCount;
server.getMonitor().sendEvent(new ExecutionPhaseEvent(System.currentTimeMillis(), server.getId(), connection.getId(), statement.getId(), id, phase, hitCountInc, missCountInc, pendingCountInc));
++phase;
this.cellCacheHitCount = hitCount;
this.cellCacheMissCount = missCount;
this.cellCachePendingCount = pendingCount;
}
use of mondrian.rolap.RolapConnection in project mondrian by pentaho.
the class MondrianServerImpl method addStatement.
@Override
public synchronized void addStatement(Statement statement) {
if (shutdown) {
throw new MondrianException("Server already shutdown.");
}
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("addStatement " + ", id=" + id + ", statements=" + statementMap.size() + ", connections=" + connectionMap.size());
}
statementMap.put(statement.getId(), statement);
final RolapConnection connection = statement.getMondrianConnection();
monitor.sendEvent(new StatementStartEvent(System.currentTimeMillis(), connection.getServer().getId(), connection.getId(), statement.getId()));
}
use of mondrian.rolap.RolapConnection in project mondrian by pentaho.
the class MondrianServerImpl method removeStatement.
@Override
public synchronized void removeStatement(Statement statement) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("removeStatement " + ", id=" + id + ", statements=" + statementMap.size() + ", connections=" + connectionMap.size());
}
if (shutdown) {
throw new MondrianException("Server already shutdown.");
}
statementMap.remove(statement.getId());
final RolapConnection connection = statement.getMondrianConnection();
monitor.sendEvent(new StatementEndEvent(System.currentTimeMillis(), connection.getServer().getId(), connection.getId(), statement.getId()));
}
Aggregations