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

com.alachisoft.ncache.security.config.Administrators Maven / Gradle / Ivy

There is a newer version: 5.3.3
Show newest version
package com.alachisoft.ncache.security.config;

import Alachisoft.NCache.Common.Configuration.*;
import com.alachisoft.ncache.serialization.core.io.InternalCompactSerializable;
import com.alachisoft.ncache.serialization.standard.io.CompactReader;
import com.alachisoft.ncache.serialization.standard.io.CompactWriter;

import java.io.IOException;

public class Administrators implements InternalCompactSerializable, Cloneable
{
	private User[] _users;
	public Administrators()
	{
		_users = new User[] { };
	}

	@ConfigurationSectionAnnotation(value = "admin")
	public final User[] getUsers()
	{
		return this._users;
	}

	@ConfigurationSectionAnnotation(value = "admin")
	public final void setUsers(User[] value)
	{
		this._users = value;
	}

	public final Object clone()
	{
		Administrators administrators = new Administrators();
		Object tempVar = getUsers().clone();
		administrators.setUsers(getUsers() != null ? (User[])((tempVar instanceof User[]) ? tempVar : null) : null);
		return administrators;
	}

	@Override
	public void Serialize(CompactWriter writer) throws IOException {
		writer.WriteObject(_users);
	}


	@Override
	public void Deserialize(CompactReader reader) throws IOException, ClassNotFoundException {
		Object tempVar = reader.ReadObject();
		_users = (User[])((tempVar instanceof User[]) ? tempVar : null);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy