=pod

=head1 NAME

Nebulous::Server - Nebulous server component

=head1 SYNOPSIS

    use Nebulous::Server;

    Nebulous::Server->new( $dsn, $username, $passwd );
    Nebulous::Server->db( $db );
    Nebulous::Server->log( $log );
    Nebulous::Server->sql( $sql );
    Nebulous::Server->config( $config );
    Nebulous::Server->create_object( $key, $class, $volume, $comment );
    Nebulous::Server->rename_object( $key, $newkey );
    Nebulous::Server->replicate_object( $key, $volume );
    Nebulous::Server->lock_object( $key, $type );
    Nebulous::Server->unlock_object( $key, $type );
    Nebulous::Server->setxattr_object( $key, $name, $value, $flags );
    Nebulous::Server->getxattr_object( $key, $name );
    Nebulous::Server->listxattr_object( $key );
    Nebulous::Server->removexattr_object( $key );
    Nebulous::Server->find_objects( $pattern );
    Nebulous::Server->find_instances( $key, $volume );
    Nebulous::Server->delete_instance( $uri );
    Nebulous::Server->stat_object( $key );

=head1 DESCRIPTION

This is the server side component of the Nebulous system.  It is primarily a
middle-ware abstraction of an SQL database.

=head1 USAGE

Typically, this module would not be directly interacted with (although, it is
possible to do so).  It is intended that one or more intermediate transport
layers are used (SOAP, XML-RPC, etc.)

=head2 Import Parameters

This module accepts no arguments to it's C<import> method and exports no
I<symbols>.

=head2 Methods

=head3 Class Methods

=over 4

=item * setup( $dsn, $username, $passwd );

Accepts 3 parameters, all are mandatory.  Returns Boolean true.  Throws an
exception on error.

=item * create_object( $key, $class, $volume, $comment );

Accepts 4 parameters, only the first is mandatory.  Returns a URI.  Throws an
exception on error.

=item * replicate_object( $key, $volume );

Accepts 2 parameters, only the first is mandatory.  Returns a URI.  Throws an
exception on error.

=item * lock_object( $key, $type );

Accepts 2 parameters, all are mandatory.  Returns Boolean true.   Throws an
exception on error.

=item * unlock_object( $key, $type );

Accepts 2 parameters, all are mandatory.  Returns Boolean true.   Throws an
exception on error.

=item * find_instance( $key, $volume );

Accepts 2 parameters, only the first is mandatory.  Returns an arrayref.
Throws an exception on error.

=item * delete_instance( $uri );

Accepts 1 parameters, it is mandatory.  Returns Boolean true.  Throws an
exception on error.

=item * stat_object( $key );

Accepts 1 parameters, it is mandatory.  Returns a list of: so_id, ext_id,
class_id, comment, read_lock, write_lock, epoch.

=back

=head1 DEVELOPER NOTES

=head2 REFERENCES

=head1 CREDITS

Just me, myself, and I.

=head1 SUPPORT

Please contact the author directly via e-mail.

=head1 AUTHOR

Joshua Hoblitt <jhoblitt@cpan.org>

=head1 COPYRIGHT

Copyright (C) 2004-2005  Joshua Hoblitt.  All rights reserved.

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place - Suite 330, Boston, MA  02111-1307, USA.

The full text of the license can be found in the LICENSE file included with
this module, or in the L<perlgpl> Pod as supplied with Perl 5.8.1 and later.

=head1 SEE ALSO

L<Nebulous::Client>

=cut
