UNPKG

cassandra-server

Version:

A thin Javascript wrapper around Apache Cassandra to provide out of the box server support

488 lines (485 loc) 20.1 kB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_67) on Sun Sep 07 15:29:29 CEST 2014 --> <title>DataResource (apache-cassandra API)</title> <meta name="date" content="2014-09-07"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="DataResource (apache-cassandra API)"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/DataResource.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../org/apache/cassandra/auth/CassandraAuthorizer.html" title="class in org.apache.cassandra.auth"><span class="strong">Prev Class</span></a></li> <li><a href="../../../../org/apache/cassandra/auth/IAuthenticator.html" title="interface in org.apache.cassandra.auth"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?org/apache/cassandra/auth/DataResource.html" target="_top">Frames</a></li> <li><a href="DataResource.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">org.apache.cassandra.auth</div> <h2 title="Class DataResource" class="title">Class DataResource</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>org.apache.cassandra.auth.DataResource</li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>All Implemented Interfaces:</dt> <dd><a href="../../../../org/apache/cassandra/auth/IResource.html" title="interface in org.apache.cassandra.auth">IResource</a></dd> </dl> <hr> <br> <pre>public class <span class="strong">DataResource</span> extends java.lang.Object implements <a href="../../../../org/apache/cassandra/auth/IResource.html" title="interface in org.apache.cassandra.auth">IResource</a></pre> <div class="block">The primary type of resource in Cassandra. Used to represent a column family or a keyspace or the root level "data" resource. "data" - the root level data resource. "data/keyspace_name" - keyspace-level data resource. "data/keyspace_name/column_family_name" - cf-level data resource.</div> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method_summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>static <a href="../../../../org/apache/cassandra/auth/DataResource.html" title="class in org.apache.cassandra.auth">DataResource</a></code></td> <td class="colLast"><code><strong><a href="../../../../org/apache/cassandra/auth/DataResource.html#columnFamily(java.lang.String,%20java.lang.String)">columnFamily</a></strong>(java.lang.String&nbsp;keyspace, java.lang.String&nbsp;columnFamily)</code> <div class="block">Creates a DataResource instance representing a column family.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><strong><a href="../../../../org/apache/cassandra/auth/DataResource.html#equals(java.lang.Object)">equals</a></strong>(java.lang.Object&nbsp;o)</code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><strong><a href="../../../../org/apache/cassandra/auth/DataResource.html#exists()">exists</a></strong>()</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static <a href="../../../../org/apache/cassandra/auth/DataResource.html" title="class in org.apache.cassandra.auth">DataResource</a></code></td> <td class="colLast"><code><strong><a href="../../../../org/apache/cassandra/auth/DataResource.html#fromName(java.lang.String)">fromName</a></strong>(java.lang.String&nbsp;name)</code> <div class="block">Parses a data resource name into a DataResource instance.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../org/apache/cassandra/auth/DataResource.html#getColumnFamily()">getColumnFamily</a></strong>()</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../org/apache/cassandra/auth/DataResource.html#getKeyspace()">getKeyspace</a></strong>()</code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../org/apache/cassandra/auth/DataResource.html#getName()">getName</a></strong>()</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../../org/apache/cassandra/auth/IResource.html" title="interface in org.apache.cassandra.auth">IResource</a></code></td> <td class="colLast"><code><strong><a href="../../../../org/apache/cassandra/auth/DataResource.html#getParent()">getParent</a></strong>()</code> <div class="block">Gets next resource in the hierarchy.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><strong><a href="../../../../org/apache/cassandra/auth/DataResource.html#hashCode()">hashCode</a></strong>()</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><strong><a href="../../../../org/apache/cassandra/auth/DataResource.html#hasParent()">hasParent</a></strong>()</code> <div class="block">Indicates whether or not this resource has a parent in the hierarchy.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><strong><a href="../../../../org/apache/cassandra/auth/DataResource.html#isColumnFamilyLevel()">isColumnFamilyLevel</a></strong>()</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><strong><a href="../../../../org/apache/cassandra/auth/DataResource.html#isKeyspaceLevel()">isKeyspaceLevel</a></strong>()</code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><strong><a href="../../../../org/apache/cassandra/auth/DataResource.html#isRootLevel()">isRootLevel</a></strong>()</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static <a href="../../../../org/apache/cassandra/auth/DataResource.html" title="class in org.apache.cassandra.auth">DataResource</a></code></td> <td class="colLast"><code><strong><a href="../../../../org/apache/cassandra/auth/DataResource.html#keyspace(java.lang.String)">keyspace</a></strong>(java.lang.String&nbsp;keyspace)</code> <div class="block">Creates a DataResource representing a keyspace.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static <a href="../../../../org/apache/cassandra/auth/DataResource.html" title="class in org.apache.cassandra.auth">DataResource</a></code></td> <td class="colLast"><code><strong><a href="../../../../org/apache/cassandra/auth/DataResource.html#root()">root</a></strong>()</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../org/apache/cassandra/auth/DataResource.html#toString()">toString</a></strong>()</code>&nbsp;</td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class&nbsp;java.lang.Object</h3> <code>clone, finalize, getClass, notify, notifyAll, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method_detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="root()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>root</h4> <pre>public static&nbsp;<a href="../../../../org/apache/cassandra/auth/DataResource.html" title="class in org.apache.cassandra.auth">DataResource</a>&nbsp;root()</pre> <dl><dt><span class="strong">Returns:</span></dt><dd>the root-level resource.</dd></dl> </li> </ul> <a name="keyspace(java.lang.String)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>keyspace</h4> <pre>public static&nbsp;<a href="../../../../org/apache/cassandra/auth/DataResource.html" title="class in org.apache.cassandra.auth">DataResource</a>&nbsp;keyspace(java.lang.String&nbsp;keyspace)</pre> <div class="block">Creates a DataResource representing a keyspace.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>keyspace</code> - Name of the keyspace.</dd> <dt><span class="strong">Returns:</span></dt><dd>DataResource instance representing the keyspace.</dd></dl> </li> </ul> <a name="columnFamily(java.lang.String, java.lang.String)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>columnFamily</h4> <pre>public static&nbsp;<a href="../../../../org/apache/cassandra/auth/DataResource.html" title="class in org.apache.cassandra.auth">DataResource</a>&nbsp;columnFamily(java.lang.String&nbsp;keyspace, java.lang.String&nbsp;columnFamily)</pre> <div class="block">Creates a DataResource instance representing a column family.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>keyspace</code> - Name of the keyspace.</dd><dd><code>columnFamily</code> - Name of the column family.</dd> <dt><span class="strong">Returns:</span></dt><dd>DataResource instance representing the column family.</dd></dl> </li> </ul> <a name="fromName(java.lang.String)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>fromName</h4> <pre>public static&nbsp;<a href="../../../../org/apache/cassandra/auth/DataResource.html" title="class in org.apache.cassandra.auth">DataResource</a>&nbsp;fromName(java.lang.String&nbsp;name)</pre> <div class="block">Parses a data resource name into a DataResource instance.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - Name of the data resource.</dd> <dt><span class="strong">Returns:</span></dt><dd>DataResource instance matching the name.</dd></dl> </li> </ul> <a name="getName()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getName</h4> <pre>public&nbsp;java.lang.String&nbsp;getName()</pre> <dl> <dt><strong>Specified by:</strong></dt> <dd><code><a href="../../../../org/apache/cassandra/auth/IResource.html#getName()">getName</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/cassandra/auth/IResource.html" title="interface in org.apache.cassandra.auth">IResource</a></code></dd> <dt><span class="strong">Returns:</span></dt><dd>Printable name of the resource.</dd></dl> </li> </ul> <a name="getParent()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getParent</h4> <pre>public&nbsp;<a href="../../../../org/apache/cassandra/auth/IResource.html" title="interface in org.apache.cassandra.auth">IResource</a>&nbsp;getParent()</pre> <div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../org/apache/cassandra/auth/IResource.html#getParent()">IResource</a></code></strong></div> <div class="block">Gets next resource in the hierarchy. Call hasParent first to make sure there is one.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code><a href="../../../../org/apache/cassandra/auth/IResource.html#getParent()">getParent</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/cassandra/auth/IResource.html" title="interface in org.apache.cassandra.auth">IResource</a></code></dd> <dt><span class="strong">Returns:</span></dt><dd>Parent of the resource, if any. Throws IllegalStateException if it's the root-level resource.</dd></dl> </li> </ul> <a name="isRootLevel()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>isRootLevel</h4> <pre>public&nbsp;boolean&nbsp;isRootLevel()</pre> </li> </ul> <a name="isKeyspaceLevel()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>isKeyspaceLevel</h4> <pre>public&nbsp;boolean&nbsp;isKeyspaceLevel()</pre> </li> </ul> <a name="isColumnFamilyLevel()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>isColumnFamilyLevel</h4> <pre>public&nbsp;boolean&nbsp;isColumnFamilyLevel()</pre> </li> </ul> <a name="getKeyspace()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getKeyspace</h4> <pre>public&nbsp;java.lang.String&nbsp;getKeyspace()</pre> <dl><dt><span class="strong">Returns:</span></dt><dd>keyspace of the resource. Throws IllegalStateException if it's the root-level resource.</dd></dl> </li> </ul> <a name="getColumnFamily()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getColumnFamily</h4> <pre>public&nbsp;java.lang.String&nbsp;getColumnFamily()</pre> <dl><dt><span class="strong">Returns:</span></dt><dd>column family of the resource. Throws IllegalStateException if it's not a cf-level resource.</dd></dl> </li> </ul> <a name="hasParent()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>hasParent</h4> <pre>public&nbsp;boolean&nbsp;hasParent()</pre> <div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../org/apache/cassandra/auth/IResource.html#hasParent()">IResource</a></code></strong></div> <div class="block">Indicates whether or not this resource has a parent in the hierarchy. Please perform this check before calling getParent() method.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code><a href="../../../../org/apache/cassandra/auth/IResource.html#hasParent()">hasParent</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/cassandra/auth/IResource.html" title="interface in org.apache.cassandra.auth">IResource</a></code></dd> <dt><span class="strong">Returns:</span></dt><dd>Whether or not the resource has a parent in the hierarchy.</dd></dl> </li> </ul> <a name="exists()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>exists</h4> <pre>public&nbsp;boolean&nbsp;exists()</pre> <dl> <dt><strong>Specified by:</strong></dt> <dd><code><a href="../../../../org/apache/cassandra/auth/IResource.html#exists()">exists</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/cassandra/auth/IResource.html" title="interface in org.apache.cassandra.auth">IResource</a></code></dd> <dt><span class="strong">Returns:</span></dt><dd>Whether or not the resource exists in Cassandra.</dd></dl> </li> </ul> <a name="toString()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>toString</h4> <pre>public&nbsp;java.lang.String&nbsp;toString()</pre> <dl> <dt><strong>Overrides:</strong></dt> <dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd> </dl> </li> </ul> <a name="equals(java.lang.Object)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>equals</h4> <pre>public&nbsp;boolean&nbsp;equals(java.lang.Object&nbsp;o)</pre> <dl> <dt><strong>Overrides:</strong></dt> <dd><code>equals</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd> </dl> </li> </ul> <a name="hashCode()"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>hashCode</h4> <pre>public&nbsp;int&nbsp;hashCode()</pre> <dl> <dt><strong>Overrides:</strong></dt> <dd><code>hashCode</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd> </dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/DataResource.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../org/apache/cassandra/auth/CassandraAuthorizer.html" title="class in org.apache.cassandra.auth"><span class="strong">Prev Class</span></a></li> <li><a href="../../../../org/apache/cassandra/auth/IAuthenticator.html" title="interface in org.apache.cassandra.auth"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?org/apache/cassandra/auth/DataResource.html" target="_top">Frames</a></li> <li><a href="DataResource.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small>Copyright &copy; 2014 The Apache Software Foundation</small></p> </body> </html>