class UnbindFromClusterCommand implements AdminCommand {

    @Override
    public void execute( String[] args ) throws IncorrectUsage, CommandFailed
    {
        try
        {
            Config config = loadNeo4jConfig( homeDir, configDir, arguments.parse( args ).get( ARG_DATABASE ) );
            File dataDirectory = config.get( GraphDatabaseSettings.data_directory );
            Path pathToSpecificDatabase = config.get( GraphDatabaseSettings.database_path ).toPath();

            boolean hasDatabase = true;
            try
            {
                Validators.CONTAINS_EXISTING_DATABASE.validate( pathToSpecificDatabase.toFile() );
            }
            catch ( IllegalArgumentException ignored )
            {
                // No such database, it must have been deleted. Must be OK to delete cluster state
                hasDatabase = false;
            }

            if ( hasDatabase )
            {
                confirmTargetDirectoryIsWritable( DatabaseLayout.of( pathToSpecificDatabase.toFile() ).getStoreLayout() );
            }

            ClusterStateDirectory clusterStateDirectory = ClusterStateDirectory.withoutInitializing( dataDirectory );

            if ( outsideWorld.fileSystem().fileExists( clusterStateDirectory.get() ) )
            {
                deleteClusterStateIn( clusterStateDirectory.get() );
            }
            else
            {
                outsideWorld.stdErrLine( "This instance was not bound. No work performed." );
            }
        }
        catch ( StoreLockException e )
        {
            throw new CommandFailed( "Database is currently locked. Please shutdown Neo4j.", e );
        }
        catch ( IllegalArgumentException e )
        {
            throw new IncorrectUsage( e.getMessage() );
        }
        catch ( UnbindFailureException | CannotWriteException | IOException e )
        {
            throw new CommandFailed( e.getMessage(), e );
        }
    }

      UnbindFromClusterCommand( Path homeDir, Path configDir, OutsideWorld outsideWorld );

}