<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ ModeShape (http://www.modeshape.org)
  ~
  ~ See the COPYRIGHT.txt file distributed with this work for information
  ~ regarding copyright ownership.  Some portions may be licensed
  ~ to Red Hat, Inc. under one or more contributor license agreements.
  ~ See the AUTHORS.txt file in the distribution for a full listing of 
  ~ individual contributors.
  ~
  ~ ModeShape is free software. Unless otherwise indicated, all code in ModeShape
  ~ is licensed to you under the terms of the GNU Lesser General Public License as
  ~ published by the Free Software Foundation; either version 2.1 of
  ~ the License, or (at your option) any later version.
  ~
  ~ ModeShape 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 this distribution; if not, write to:
  ~ Free Software Foundation, Inc.
  ~ 51 Franklin Street, Fifth Floor
  ~ Boston, MA  02110-1301  USA
  -->
<!DOCTYPE preface PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"	[
<!ENTITY % CustomDTD SYSTEM "../../custom.dtd">
%CustomDTD;
]>
<chapter id="disk-connector">
  <title>Disk Connector</title>
  <para>
		This connector stores content in a ModeShape-specific file format on disk.  Although this may seem similar in concept to the <link linkend="file-system-connector">File System Connector</link>,
		this connector actually serves a much different purpose.  While the File System Connector is designed to expose existing files and folders on the 
		disk and allow ModeShape users to create content that can be read directly by other applications, the Disk Connector is designed for efficiency and
		stores content in a serialized representation that is not readily accessible to other applications.  Conversely, the Disk Connector supports referenceable
		nodes and can efficiently access nodes by UUID, unlike the File System Connector.    
 	</para>
	<para>
		The &DiskSource; class provides a number of JavaBean properties that control its behavior:
	</para>
	<table frame='all'>
		<title>&DiskSource; properties</title>
		<tgroup cols='2' align='left' colsep='1' rowsep='1'>
      <colspec colname='c1' colwidth="1*"/>
      <colspec colname='c2' colwidth="1*"/>
			<thead>
				<row>
		  		<entry>Property</entry>
		  		<entry>Description</entry>
				</row>
			</thead>
			<tbody>
				<row>
					<entry>cachePolicy</entry>
					<entry>Optional property that, if used, defines the cache policy for this repository source.  When not used, this source will not define a specific
						duration for caching information.</entry>
				</row>
				<row>
					<entry>creatingWorkspaceAllowed</entry>
					<entry>Optional property that defines whether clients can create additional workspaces.  The default value is "true".
					</entry>
				</row>
				<row>
					<entry>defaultWorkspaceName</entry>
					<entry>Optional property that is initialized to <code>"default"</code> and which defines the name for the workspace that will be used by default
						if none is specified.</entry>
				</row>
				<row>
					<entry>lockFileUsed</entry>
					<entry>An advanced property that, if set to "true", indicates that repository read and write locks should be synchronized with file lock options 
					on a file in the on-disk storage.  This causes a performance penalty, but allows disk sources in different JVMS (e.g., clustered disk sources) to
					coordinate their locks.  This approach uses Java NIO file locking and is subject to the limitations of the Java NIO file locking for the current
					JVM implementation.  The default value is "false", but this should always be set to "true" when used in a clustered environment.</entry>
				</row>
				<row>
					<entry>name</entry>
					<entry>The name of the repository source, which is used by the &RepositoryService; when obtaining a &RepositoryConnection; by name.</entry>
				</row>
				<row>
					<entry>predefinedWorkspaceNames</entry>
					<entry>Optional property that, if used, defines names of the workspaces that are predefined and need not be created before being used.
						This can be coupled with a "false" value for the "creatingWorkspaceAllowed" property to allow only the use of only predefined workspaces.
					</entry>
				</row>
				<row><commit_msg>MODE-1196 Add Support for Clustering Disk Connectors<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ ModeShape (http://www.modeshape.org)
  ~
  ~ See the COPYRIGHT.txt file distributed with this work for information
  ~ regarding copyright ownership.  Some portions may be licensed
  ~ to Red Hat, Inc. under one or more contributor license agreements.
  ~ See the AUTHORS.txt file in the distribution for a full listing of 
  ~ individual contributors.
  ~
  ~ ModeShape is free software. Unless otherwise indicated, all code in ModeShape
  ~ is licensed to you under the terms of the GNU Lesser General Public License as
  ~ published by the Free Software Foundation; either version 2.1 of
  ~ the License, or (at your option) any later version.
  ~
  ~ ModeShape 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 this distribution; if not, write to:
  ~ Free Software Foundation, Inc.
  ~ 51 Franklin Street, Fifth Floor
  ~ Boston, MA  02110-1301  USA
  -->
<!DOCTYPE preface PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"	[
<!ENTITY % CustomDTD SYSTEM "../../custom.dtd">
%CustomDTD;
]>
<chapter id="disk-connector">
  <title>Disk Connector</title>
  <para>
		This connector stores content in a ModeShape-specific file format on disk.  Although this may seem similar in concept to the <link linkend="file-system-connector">File System Connector</link>,
		this connector actually serves a much different purpose.  While the File System Connector is designed to expose existing files and folders on the 
		disk and allow ModeShape users to create content that can be read directly by other applications, the Disk Connector is designed for efficiency and
		stores content in a serialized representation that is not readily accessible to other applications.  Conversely, the Disk Connector supports referenceable
		nodes and can efficiently access nodes by UUID, unlike the File System Connector.    
 	</para>
	<para>
		The &DiskSource; class provides a number of JavaBean properties that control its behavior:
	</para>
	<table frame='all'>
		<title>&DiskSource; properties</title>
		<tgroup cols='2' align='left' colsep='1' rowsep='1'>
      <colspec colname='c1' colwidth="1*"/>
      <colspec colname='c2' colwidth="1*"/>
			<thead>
				<row>
		  		<entry>Property</entry>
		  		<entry>Description</entry>
				</row>
			</thead>
			<tbody>
				<row>
					<entry>cachePolicy</entry>
					<entry>Optional property that, if used, defines the cache policy for this repository source.  When not used, this source will not define a specific
						duration for caching information.</entry>
				</row>
				<row>
					<entry>creatingWorkspaceAllowed</entry>
					<entry>Optional property that defines whether clients can create additional workspaces.  The default value is "true".
					</entry>
				</row>
				<row>
					<entry>defaultWorkspaceName</entry>
					<entry>Optional property that is initialized to <code>"default"</code> and which defines the name for the workspace that will be used by default
						if none is specified.</entry>
				</row>
				<row>
					<entry>lockFileUsed</entry>
					<entry>An advanced property that, if set to "true", indicates that repository read and write locks should be synchronized with file lock options 
					on a file in the on-disk storage.  This causes a performance penalty, but allows disk sources in different JVMS (e.g., clustered disk sources) to
					coordinate their locks <emphasis>as long as all cluster members share the same disk</emphasis>.  This approach uses Java NIO file locking and is 
					subject to the limitations of the Java NIO file locking for the current
					JVM implementation.  The default value is "false", but this should always be set to "true" when used in a clustered environment.</entry>
				</row>
				<row>
					<entry>name</entry>
					<entry>The name of the repository source, which is used by the &RepositoryService; when obtaining a &RepositoryConnection; by name.</entry>
				</row>
				<row>
					<entry>predefinedWorkspaceNames</entry>
					<entry>Optional property that, if used, defines names of the workspaces that are predefined and need not be created before being used.
						This can be coupled with a "false" value for the "creatingWorkspaceAllowed" property to allow only the use of only predefined workspaces.
					</entry>
				</row>
				<row>
{'fraction_non_alphanumeric': 0.0819937425828029, 'fraction_numerical': 0.006257417197108641, 'mean_word_length': 3.660633484162896, 'pattern_counts': {'":': 0, '<': 139, '<?xml version=': 2, '>': 139, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7059291', 'n_tokens_mistral': 2813, 'n_tokens_neox': 2428, 'n_words': 1145}