io.agora.rtm.LockDetail Maven / Gradle / Ivy
package io.agora.rtm;
import io.agora.common.internal.CalledByNative;
/**
* The information of a Lock.
*/
public class LockDetail {
/**
* The name of the lock.
*/
private String lockName = "";
/**
* The owner of the lock. Only valid when user getLocks or receive LockEvent
* with {@code RTM_LOCK_EVENT_TYPE_SNAPSHOT}
*/
private String lockOwner = "";
/**
* The ttl of the lock.
*/
private int ttl;
/**
* Creates a new instance of {@code LockDetail} with default parameters.
*/
LockDetail() {
this.ttl = 0;
}
@CalledByNative
public LockDetail(String lockName, String lockOwner, int ttl) {
this.lockName = lockName;
this.lockOwner = lockOwner;
this.ttl = ttl;
}
public String getLockName() {
return this.lockName;
}
public String getLockOwner() {
return this.lockOwner;
}
public int getTTL() {
return this.ttl;
}
@Override
public String toString() {
return "LockDetail {lockName: " + lockName + ", lockOwner: " + lockOwner + ", ttl: " + ttl
+ "}";
}
}