<commit_before>package org.safehaus.subutai.common.environment;


import java.util.Set;
import java.util.UUID;

import org.safehaus.subutai.common.peer.ContainerHost;
import org.safehaus.subutai.common.peer.Peer;


/**
 * Environment
 */
public interface Environment
{

    public Long getUserId();

    public UUID getId();

    public String getName();

    public EnvironmentStatus getStatus();

    public long getCreationTimestamp();

    public String getSshKey();

    public Set<ContainerHost> getContainerHosts();


    public void destroyContainer( ContainerHost containerHost, boolean async )
            throws EnvironmentNotFoundException, EnvironmentModificationException;


    public Set<ContainerHost> growEnvironment( Topology topology, boolean async )
            throws EnvironmentModificationException;


    public void setSshKey( String sshKey, boolean async ) throws EnvironmentModificationException;

    public Set<Peer> getPeers();

    /**
     * Network subnet of the environment in CIDR format notation.
     *
     * @return subnet string in CIDR format notation
     */
    public String getSubnetCidr();


    /**
     * VNI of the environment.
     */
    public Long getVni();


    public ContainerHost getContainerHostById( UUID id ) throws ContainerHostNotFoundException;


    public ContainerHost getContainerHostByHostname( String hostname ) throws ContainerHostNotFoundException;

    @Deprecated
    public Set<ContainerHost> getContainerHostsByIds( Set<UUID> ids ) throws ContainerHostNotFoundException;
}<commit_msg>fixed comments<commit_after>package org.safehaus.subutai.common.environment;


import java.util.Set;
import java.util.UUID;

import org.safehaus.subutai.common.peer.ContainerHost;
import org.safehaus.subutai.common.peer.Peer;


/**
 * Environment
 */
public interface Environment
{
    /**
     * Return id of environment creator user
     */
    public Long getUserId();

    /**
     * Returns id of environment
     */
    public UUID getId();

    /**
     * Returns name of environment
     */
    public String getName();

    /**
     * Returns status of environment
     *
     * @return @{code EnvironmentStatus}
     */
    public EnvironmentStatus getStatus();

    /**
     * Returns creation timestamp
     */
    public long getCreationTimestamp();

    /**
     * Returns ssh key if any of environment
     *
     * @return - key or null
     */
    public String getSshKey();

    /**
     * Returns contained container hosts
     *
     * @return - set of @{code ContainerHost}
     */
    public Set<ContainerHost> getContainerHosts();


    /**
     * Destroys the specified container
     *
     * @param containerHost - container to destroy
     * @param async - sync or async to the calling party
     */
    public void destroyContainer( ContainerHost containerHost, boolean async )
            throws EnvironmentNotFoundException, EnvironmentModificationException;


    /**
     * Grows environment according to the passed topology
     *
     * @param topology = topology to use when growing
     * @param async - sync or async to the calling party
     */
    public Set<ContainerHost> growEnvironment( Topology topology, boolean async )
            throws EnvironmentModificationException;


    /**
     * Sets/removes ssh key
     *
     * @param sshKey - ssh key or null to remove
     * @param async - sync or async to the calling party
     */
    public void setSshKey( String sshKey, boolean async ) throws EnvironmentModificationException;

    /**
     * Returns pees which host any container(s) from this environment
     * @return
     */
    public Set<Peer> getPeers();

    /**
     * Network subnet of the environment in CIDR format notation.
     *
     * @return subnet string in CIDR format notation
     */
    public String getSubnetCidr();


    /**
     * VNI of the environment.
     */
    public Long getVni();

    /**
     * Searches container by its id withing this environment
     * @param id - id of container to find
     * @return - found container host
     * @throws ContainerHostNotFoundException
     */

    public ContainerHost getContainerHostById( UUID id ) throws ContainerHostNotFoundException;

    /**
     * Searches container by its hostname withing this environment
     * @param hostname - hostname of container to find
     * @return - found container host
     * @throws ContainerHostNotFoundException
     */
    public ContainerHost getContainerHostByHostname( String hostname ) throws ContainerHostNotFoundException;

    @Deprecated
    public Set<ContainerHost> getContainerHostsByIds( Set<UUID> ids ) throws ContainerHostNotFoundException;
}
{'fraction_non_alphanumeric': 0.07787497333048858, 'fraction_numerical': 0.0, 'mean_word_length': 2.926298157453936, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '685597', 'n_tokens_mistral': 1230, 'n_tokens_neox': 1173, 'n_words': 386}