Package io.crate.operation.reference.sys.operation

Examples of io.crate.operation.reference.sys.operation.OperationContext


        assertThat(stats.jobsLog.get().size(), is(1));


        stats.operationsLog.get().add(new OperationContextLog(
                new OperationContext(UUID.randomUUID(), "foo", 2L), null));
        stats.operationsLog.get().add(new OperationContextLog(
                new OperationContext(UUID.randomUUID(), "foo", 3L), null));

        stats.listener.onRefreshSettings(ImmutableSettings.builder()
                .put(CrateSettings.STATS_ENABLED.settingName(), true)
                .put(CrateSettings.STATS_OPERATIONS_LOG_SIZE.settingName(), 1).build());
View Full Code Here


    public void operationStarted(UUID operationId, UUID jobId, String name) {
        if (isEnabled()) {
            operationsTable.put(
                    operationId,
                    new OperationContext(jobId, name, System.currentTimeMillis()));
        }
    }
View Full Code Here

    public void operationFinished(@Nullable UUID operationId, @Nullable String errorMessage) {
        if (operationId == null || !isEnabled()) {
            return;
        }
        OperationContext operationContext = operationsTable.remove(operationId);
        if (operationContext == null) {
            // this might be the case if the stats were disabled when the operation started but have
            // been enabled before the finish
            return;
        }
View Full Code Here

TOP

Related Classes of io.crate.operation.reference.sys.operation.OperationContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.