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

com.enonic.xp.cluster.ClusterNodes Maven / Gradle / Ivy

There is a newer version: 7.14.4
Show newest version
package com.enonic.xp.cluster;

import java.util.ArrayList;
import java.util.List;

import com.google.common.collect.ImmutableSet;

import com.enonic.xp.support.AbstractImmutableEntitySet;

public class ClusterNodes
    extends AbstractImmutableEntitySet
{
    @Deprecated
    public ClusterNodes( final ImmutableSet set )
    {
        super( set );
    }

    private ClusterNodes( final ImmutableSet set, boolean ignore )
    {
        super( set );
    }

    public static Builder create()
    {
        return new Builder();
    }

    public static class Builder
    {
        private final List nodes = new ArrayList<>();

        public Builder add( final ClusterNode node )
        {
            this.nodes.add( node );
            return this;
        }

        public ClusterNodes build()
        {
            return new ClusterNodes( ImmutableSet.copyOf( nodes ), false );
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy