Loading...
Searching...
No Matches
XrdSsiResource.hh
Go to the documentation of this file.
#ifndef __XRDSSIRESOURCE_HH__
#define __XRDSSIRESOURCE_HH__
/******************************************************************************/
/* */
/* X r d S s i R e s o u r c e . h h */
/* */
/* (c) 2016 by the Board of Trustees of the Leland Stanford, Jr., University */
/* Produced by Andrew Hanushevsky for Stanford University under contract */
/* DE-AC02-76-SFO0515 with the Department of Energy */
/* */
/* This file is part of the XRootD software suite. */
/* */
/* XRootD is free software: you can redistribute it and/or modify it under */
/* the terms of the GNU Lesser General Public License as published by the */
/* Free Software Foundation, either version 3 of the License, or (at your */
/* option) any later version. */
/* */
/* XRootD 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 Lesser General Public */
/* License for more details. */
/* */
/* You should have received a copy of the GNU Lesser General Public License */
/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
/* */
/* The copyright holder's institutional names and contributor's names may not */
/* be used to endorse or promote products derived from this software without */
/* specific prior written permission of the institution or contributor. */
/******************************************************************************/
#include <cstdint>
#include <string>
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
class XrdSsiEntity;
class XrdSsiResource
{
public:
std::string rName;
std::string rUser;
std::string rInfo;
std::string hAvoid;
XrdSsiEntity *client;
enum Affinity {Default,
None,
Weak,
Strong,
Strict
};
Affinity affinity;
uint32_t rOpts;
static
const uint32_t Reusable= 1;
static
const uint32_t Discard = 2;
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
XrdSsiResource(std::string rname,
std::string havoid="",
std::string ruser="",
std::string rinfo="",
uint32_t ropts=0,
Affinity raff=Default
) : rName(rname), rUser(ruser), rInfo(rinfo),
hAvoid(havoid), client(0), affinity(raff),
rOpts(ropts) {}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
~XrdSsiResource() {}
};
#endif
XrdSsiEntity
Definition XrdSsiEntity.hh:44
XrdSsiResource::Affinity
Affinity
Definition XrdSsiResource.hh:52
XrdSsiResource::None
@ None
Resource has no affinity, any endpoint will do.
Definition XrdSsiResource.hh:53
XrdSsiResource::Strict
@ Strict
Always use same node for resource no matter what.
Definition XrdSsiResource.hh:56
XrdSsiResource::Weak
@ Weak
Use resource on same node if possible, don't wait.
Definition XrdSsiResource.hh:54
XrdSsiResource::Default
@ Default
Use configured affinity.
Definition XrdSsiResource.hh:52
XrdSsiResource::Strong
@ Strong
Use resource on same node even if wait required.
Definition XrdSsiResource.hh:55
XrdSsiResource::rUser
std::string rUser
-> Name of the resource user (nil if anonymous)
Definition XrdSsiResource.hh:47
XrdSsiResource::client
XrdSsiEntity * client
-> Pointer to client identification (server-side)
Definition XrdSsiResource.hh:50
XrdSsiResource::XrdSsiResource
XrdSsiResource(std::string rname, std::string havoid="", std::string ruser="", std::string rinfo="", uint32_t ropts=0, Affinity raff=Default)
Definition XrdSsiResource.hh:92
XrdSsiResource::rOpts
uint32_t rOpts
Resource options. One or more of he following:
Definition XrdSsiResource.hh:60
XrdSsiResource::affinity
Affinity affinity
Resource affinity.
Definition XrdSsiResource.hh:58
XrdSsiResource::rInfo
std::string rInfo
-> Additional information in CGI format
Definition XrdSsiResource.hh:48
XrdSsiResource::Reusable
static const uint32_t Reusable
Definition XrdSsiResource.hh:62
XrdSsiResource::rName
std::string rName
-> Name of the resource to be used
Definition XrdSsiResource.hh:46
XrdSsiResource::~XrdSsiResource
~XrdSsiResource()
Destructor.
Definition XrdSsiResource.hh:106
XrdSsiResource::hAvoid
std::string hAvoid
-> Comma separated list of hosts to avoid
Definition XrdSsiResource.hh:49
XrdSsiResource::Discard
static const uint32_t Discard
Definition XrdSsiResource.hh:64