All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Alachisoft.NCache.Common.Monitoring.ClientActivity Maven / Gradle / Ivy

There is a newer version: 5.3.3
Show newest version
package Alachisoft.NCache.Common.Monitoring;

import java.io.Serializable;

public class ClientActivity implements Cloneable, Serializable {
    //C# TO JAVA CONVERTER TODO TASK: Java annotations will not correspond to .NET attributes:
    //[CLSCompliant(false)]
    public java.util.Date _startTime = new java.util.Date(0);
    //C# TO JAVA CONVERTER TODO TASK: Java annotations will not correspond to .NET attributes:
    //[CLSCompliant(false)]
    public java.util.Date _endTime = new java.util.Date(0);
    //C# TO JAVA CONVERTER TODO TASK: Java annotations will not correspond to .NET attributes:
    //[CLSCompliant(false)]
    public Thread _thread;
    private java.util.ArrayList _activities = new java.util.ArrayList();

    public ClientActivity() {
        _startTime = new java.util.Date();
    }

    public final void LogActivity(String method, String log) {
        MethodActivity mActivity = new MethodActivity(method, log);
        synchronized (this) {
            _activities.add(mActivity);
        }
    }

    public final java.util.Date getStartTime() {
        return _startTime;
    }

    public final java.util.Date getEndTime() {
        return _endTime;
    }

    public final java.util.ArrayList getActivities() {
        return _activities;
    }

    public final void Clear() {
        synchronized (this) {
            _activities.clear();
        }
    }

    public final void StartActivity() {
    }

    public final void StopActivity() {
        _endTime = new java.util.Date();
    }


//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
    ///#region ICloneable Members

    public final Object clone() {
        ClientActivity clone = new ClientActivity();
        synchronized (this) {
            clone._startTime = _startTime;
            clone._endTime = _endTime;
            Object tempVar = _activities.clone();
            clone._activities = (java.util.ArrayList) ((tempVar instanceof java.util.ArrayList) ? tempVar : null);
        }
        return clone;
    }

//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
    ///#endregion
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy