Solstice::Service::Memory - For storing information that will last the lifetime of the mod_perl thread.


Solstice documentation Contained in the Solstice distribution.

Index


Code Index:

NAME

Top

Solstice::Service::Memory - For storing information that will last the lifetime of the mod_perl thread.

SYNOPSIS

Top

  use base qw(Solstice::Service::Memory);

  sub new {
    my $obj = shift;
    return $obj->SUPER::new(@_);
  }

DESCRIPTION

Top

Creates an API for subclasses to use to manage and make available persisted global data.

Export

No symbols exported.

Methods

new()

Creates a new Solstice::Service::Memory object.

Private Methods

_clearDataStore()
_getDataStore()
_getKeyname()

Returns a generated string for use as a hash key in the object's datastore. The key is not thread-namespaced.

Modules Used

Solstice::Service.

AUTHOR

Top

Catalyst Group, <catalyst@u.washington.edu>

VERSION

Top

$Revision: 3364 $

COPYRIGHT

Top


Solstice documentation Contained in the Solstice distribution.
package Solstice::Service::Memory;

# $Id: Memory.pm 3364 2006-05-05 07:18:21Z mcrawfor $

use 5.006_000;
use strict;
use warnings;

use base qw(Solstice::Service);

our ($VERSION) = ('$Revision: 3364 $' =~ /^\$Revision:\s*([\d.]*)/);

our $data_store = {};

sub new {
    my $obj = shift;
    return $obj->SUPER::new(@_);
}

sub _clearDataStore {
    return 0;
}

sub _getDataStore {
    return $data_store;
}

sub _getKeyname {
    my $self = shift;
    my $key  = shift || 'generic';
    return $self->_getClassName().':'.$key;
}

1;
__END__